English

How To: Register commands or classes in the Windows Registry

Summary

This article covers several ways for ArcObjects Developers to register and unregister commands or components.

Procedure

Warning:
The instructions below include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult with a qualified computer systems professional, if necessary.

Esri cannot guarantee results from incorrect modifications while following these instructions; therefore, use caution and proceed at your own risk.
These options are presented from easiest to most difficult, but the most difficult is the most automatic and friendliest to end-users.

-- Register/unregister components using RegCat.exe The RegCat.exe application is located in the ArcGIS/arcexe81/bin folder. To register or unregister a command:
1. Drag and drop the DLL that you have written onto this application.
2. In the pop-up window, select the application for which you are registering or unregistering your command.
3. Click Register or Unregister.

A check appears next to your DLL filename as the operation is completed and the RegCat.exe window closes.
Note:
To make dragging and dropping more convenient, copy RegCat.exe to the folder within which you are developing your functionality.
-- Register/unregister ArcObjects components using regsvr32.exe.
· To register your command:
1. From the Taskbar click Start>Run
2. Type:
regsvr32 <your file path name>
For example:
regsvr32 d:\vb_work\georef\mycmd.dll
3. Click OK.
· To unregister your command:
1. From the Taskbar click Start>Run
2. Type:
regsvr32 -u <your file path name>
For example:
regsvr32 -u d:\vb_work\georef\mycmd.dll
3. Click OK. -- Register ArcObjects components using self registering code.

The Visual Basic 'Compile and Register add-in' tool will aid you in the creation and maintenance of ArcGIS components. This tool is located in arcgis\arcexe81\ArcObjects Developer Kit\Utilities. You can register the 'Compile and Register add-in' alone by self-registering the CompileAndRegister.dll in this folder. This add-in requires the use and registration of the CatMgrHelper.dll. To register all of the ESRI add-ins at once, you can run the batch file RegAddins.bat found in this folder.
For more information on how to use the 'Compile and Register add-in' tool, see the ESRI Compile and Register link below.

For more information about component categories, refer to Exploring ArcObjects, by Michael Zeiler, chapter 2 (Developing with ArcObjects).

Related Information