The RegSvr32 utility installs a DLL as an in-process server. It invokes one or more functions that are implemented by the application, and exported by name by the DLL. The primary task of these functions is to create or delete appropriate registry entries. The following functions can be invoked by RegSvr32.
DllRegisterServer is used for installing DLLs. It should create any necessary registry keys.
DllUnregisterServer is used for uninstalling DLLs. It should delete any registry keys that are no longer needed.
DllInstall is used for both installing and uninstalling DLLs. It can be used in addition to DllRegisterServer and DllUnregisterServer, or in place of them. It is intended for DLLs that can be installed in more than one way. Unlike DllRegisterServer and DllUnregisterServer, which take no arguments, DllInstall takes two arguments. The first is a Boolean value that specifies whether the DLL is being installed (TRUE) or uninstalled (FALSE). The second is a string that can be used to specify which installation procedure to use.
The following is the RegSvr32 command-line syntax.
regsvr32 [flag1 [flag2 ...] DllName
Uninstall the DLL. If the /i flag is not included DllUnregisterServer will be invoked.
Invoke DllInstall. If the /u flag is included, DllInstall is instructed to uninstall the DLL, by setting the first parameter to FALSE. Otherwise, the first parameter will be set to TRUE, and DllInstall will install the DLL. The string following the colon will be passed in as the second parameter to DllInstall. It is used to specify which installation procedure is to be used. If /i is used without the colon and string literal, the second parameter of DllInstall will be set to NULL. Unless the /n flag is included, DllRegisterServer or DllUnregisterServer will also be invoked.
Do not invoke DllRegisterServer or DllUnregisterServer. This flag can only be used in combination with /i.
If no flags are specified, RegSvr32 will install the DLL by invoking DllRegisterServer.
To register a DLL named DllName.Dll by invoking its DllRegisterServer function, use the following command:
To unregister the DLL with DllInstall's "uninstall_1" procedure without also invoking DllUnregister, use the following command:
regsvr32 /u /n /i:"uninstall_1" dllname.dll