Instructions provided describe how to create a batch file that will automatically register an ArcGIS .dll file.
To use a custom .dll in ArcMap the .dll needs to be registered with ArcMap and registered with Windows. Creating a batch file makes deployment of custom objects simpler.
The concepts below also apply for ArcGIS 9.x. However ArcGIS 9.0 introduces a change in the structure of type libraries that define ArcObjects classes. This may require some changes to your existing ArcObjects developments. See the documents in the Related Information section for more information on migrating to 9.0.
- Open the project in Visual Basic 6.0 and click Add-Ins > ESRI compile and Register.
For visual studio .NET, see ESRI Add-Ins for .NET
- Select the class implementing the IExtension interface, then check ESRI Mx Extensions and click Compile.
If the Compile and Register Add-In is not listed:
A. Navigate to Install Drive\arcgis\arceexe83\ArcObjects Developer Kit\Utilities.
B. Double-click RegAddins.bat to add the ESRI utility tools to the VB IDE.
For ArcGIS 9, navigate to C:\Program Files\ArcGIS\DeveloperKit\Addins and double-click on RegisterVBAAddins.exe.
- Use Windows Explorer to browse to the project folder and note that a <dll name>.reg file was created.
- Create a batch file reg.bat to register the extension.
- Open a text editor and add the following information.
regsvr32 /s Extension.dll
regedit /s Extension.reg
In the preceding code, Extension.dll is the name of the .dll and Extension.reg is the name of the .reg file ESRI compile and Register utility created.
- Provide the end users with the Extension.dll, Extension.reg and the reg.bat batch file. Users will need to double-click reg.bat to register the extension on their machine.