You can use the Regsvr32 tool (Regsvr32.exe) to register and unregister OLE controls such as DLL or ActiveX Controls (OCX) files in the Windows Registry.
From Microsoft Support's Article ID: 249873:
Regsvr32.exe is included with Microsoft Internet Explorer 3.0 or later versions, Windows 95 OEM Service Release 2 (OSR2) or later versions, and Windows NT 4.0 Service Pack 5 (SP5) or later versions. Regsvr32.exe is installed in the System (Windows Me/Windows 98/Windows 95) or System32 (Windows NT/Windows XP/Windows Vista/Windows 7) folder.
Note: On a 64-bit version of a Windows operating system, there are two versions of the Regsv32.exe file:
- The 64-bit version is
%systemroot%\System32\regsvr32.exe
- The 32-bit version is
%systemroot%\SysWoW64\regsvr32.exe
Usage
RegSvr32.exe has the following command-line options:
Regsvr32 [/u] [/n] [/i[:cmdline]] dllname
/u
- Unregister server
/i
- Call DllInstall passing it an optional [cmdline]; when used with /u calls dll uninstall
/n
- Do not call DllRegisterServer; this option must be used with /i
/s
- Silent; display no message boxes (added with Windows XP and Windows Vista)
When you use Regsvr32.exe, it attempts to load the component and call its DLLSelfRegister
function. If this attempt is successful, Regsvr32.exe displays a dialog box that indicates success. If the attempt is unsuccessful, Regsvr32.exe returns an error message.
For example, to manually register a Sample.ocx ActiveX control, type the following command at the command prompt:
c:\regsvr32.exe sample.ocx
For more information, see How to Register a DLL