Sometimes the applications may miss registering the DLL or OCX files, due to which users will face errors and applications won’t work properly. Because of this, users will require to register the files by themselves. The registering and unregistering of the application extension files (DLL or OCX) are done by RegSvr32 utility. In this article, we will teach you how easily you can register a DLL or OCX file in your operating system.
How to Register DLL or OCX file in Windows
Registering a DLL or OCX File in Windows
By registering a DLL or OCX, users are adding the information to theregistryso that Windows can use those files. The information will be in the form of a name or CLSID. This makes it easier for Windows to find the correct DLL or OCX when a function related to it is used within another program. It will contain the path of these files through which the executable code for the component will be used. The information saved in the registry will always refer to the latest version of the component. This is required only in rare cases because in most cases the applications will register these files during installation. It can also be used for therepairing of the Windowsissues that include these files. Some extra parameters that you can add to the commands:
/u– Unregister the DLL or OCX file
/s– Silent mode, it will show no message boxes.
/I– If used without /u then calls DLLInstall(TRUE) to install and If used with /u then calls DllInstall(FALSE) to uninstall the DLL and DllUnregisterServer.
/n– For not calling the DllRegister Server or DllUnregisterServer. This option must be used with /i.
You can only register the DLL or OCX files that are registerable. Some files will have noDLLRegisterServer() functions through which it can register. Those files are ordinary and have nothing to do with registering. An example can be taken from game DLL files that stay in the folder and do their job without getting registered in the first place.
Note: Make sure you already have the DLL or OCX file available before trying these methods.
Using the Elevated Command Prompt to Register a DLL or OCX File
Hold theWindowskey and pressSto open the search function. Typecmd, right-click on it and chooseRun as administratoroption Note: You can also pressAlt + Shift + Enterafter typing cmd in the search function.
Opening elevated command prompt
Now type the command below to register the DLL or OCX file.regsvr32 jscript.dll
Note: jscript.dll is the file name that you can change to whatever file you want to register.
Successfully registered DLL file
You can also register a DLL or OCX file that is located in a different location by typing the following command.regsvr32 C:\Users\Kevin\Desktop\jscript.dll
Registering DLL on a different path
If the file is not registerable then you may get the error as shown below:
Error for not registering
Sometimes the error can be because you are trying to register a 32-bit DLL or OCX file through 64-bitRegsvr32. You need to use the 32-bitRegsvr32that is located in theSyswow64folder.
You can type the following command to register 32-bit DLL or OCX in a 64-bit operating system.%SystemRoot%\SysWOW64\regsvr32 jscript.dll
Registering 32-bit DLL file on 64-bit Windows
You can also use PowerShell with the same commands to register DLL or OCX files.
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.