How to Register a DLL or OCX Files in Windows 10 via Command Prompt

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 the registry so 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 the repairing of the Windows issues 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 no DLLRegisterServer() 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

  1. Hold the Windows key and press S to open the search function. Type cmd, right-click on it and choose Run as administrator option
    Note: You can also press Alt + Shift + Enter after typing cmd in the search function.

    Opening elevated command prompt
  2. 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
  3. 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
  4. If the file is not registerable then you may get the error as shown below:
    Error for not registering
  5. Sometimes the error can be because you are trying to register a 32-bit DLL or OCX file through 64-bit Regsvr32. You need to use the 32-bit Regsvr32 that is located in the Syswow64 folder.
  6. 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 Arrows
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.

Expert Tip

How to Register a DLL or OCX Files in Windows 10 via Command Prompt

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested