HOW TO

How to programmatically register an ArcGIS DLL written in VB

Last Published: April 25, 2020

Summary

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.

Procedure

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.

  1. 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
  2. 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.
  3. Use Windows Explorer to browse to the project folder and note that a <dll name>.reg file was created.
  4. Create a batch file reg.bat to register the extension.
  5. Open a text editor and add the following information.

    Code:
    regsvr32 /s Extension.dll
    regedit /s Extension.reg


    Note:
    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.

  6. 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.

Article ID:000006598

Software:
  • ArcMap 8 x
  • ArcMap 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic