Microsoft operating systems and ReactOS provides the regsvr32 command in order to register and unregister DLL files. Also, ActiveX components can be registered by using the regsvr32 command. You may think that the 32 in the regsvr32 command is about 32-bit architecture but it’s not. You can use the regsvr32 for both 32-bit and 64-bit operating systems. The regsvr32 command is very similar to the Linux ldconfig command which loads kernel modules.
regsvr32 Command Parameters
The regsrv32 command has the following parameters as short.
regsrv32 PARAMETER DLL
|/u||Unregister specified DLL|
|/s||Do not display messages during register|
|/e||Do not display success messages|
|/n||Prevent calling DllRegisterServer|
|/i:CMD||Run CMD command during register and unregister|
|DLL||Specify DLL name|
|/?||Display help information|
The regsvr32 is an executable file and command which is located under the Windows operating system directory. The complete path of the regsvr32 is like below.
If the operating system is 32-bit it is located under the 32-bit SysWoW directory like below.
Register DLL with regsvr32
Registering a DLL with the regsrv32 command is very easy where the DLL file name and if required path should be specified like below. In the following example, we will register the DLL named schmmgmt.dll .
> regsvr32 schmmgmt.dll
Alternatively the absolute path of the DLL file can be specified to register a DLL.
> regsvr32 "C:\Downloads\schmmgmt.dll"
Unregister DLL with regsvr32
All ready registered DLL’s can be unregistered with the regsvr32 command by using the
/u parameter and providing the DLL name. In the following example, we will deregister the schmmgmt.dll .
> regsvr32 /u schmmgmt.dll
You can also provide the full or absolute path of the DLL file in order to unregister.
> regsvr32 /u "C:\Downloads\schmmgmt.dll"
Do Not Display Messages
During the register operation, the actions will be printed into the command line for success or error by default. But you can prevent these messages with the
/s option like below.
> regsvr32 /s schmmgmt.dll
Also the do not display message parameter can be used for unregister operation too like below.
> regsvr32 /u /s schmmgmt.dll