How to register a DLL or OCX file in Windows 10 via command prompt

Contents

Sometimes, Applications may not register DLL or OCX files, so users will face errors and applications will not work properly. Because of this, users will need to register the files themselves. RegSvr32 utility performs registration and unregistering of application extension files (DLL u OCX). In this article, We will show you how easy it is to register a DLL or OCX file on your operating system.

untitled-1-6415139How to register the DLL or OCX file in Windows

Registering a DLL or OCX file in Windows

When registering a DLL or OCX, users add the information to the registry so that Windows can use those files. The information will be in the form of name or CLSID. This makes it easier for Windows to find the correct DLL or OCX when using a related function within another program. It will contain the path of these files through which the executable code of the component will be used. The information saved in the registry will always refer to the latest version of the component. This is necessary only in exceptional cases because, In most cases, applications will log these files during installation. It can also be used to repair Windows problems related to these files. Some additional parameters that you can add to your commands:

  • / u – Unregister the DLL or OCX file

  • / s: silence mode, will not show any message box.

  • / I: if used without / u, call DLLInstall (TRUE) to install and if used with / u, then call DllInstall (FALSE) to uninstall the DLL and DllUnregisterServer.

  • / n – For not calling the Registry Server Dll or the Registry Server Dll. This option should be used with / i.

You can only register DLL or OCX files that can be registered. Some files will not have any DLLRegisterServer function () through which they can register. Those files are normal and have nothing to do with the registry. You can take an example of the DLL files from the games that remain in the folder and do their job without registering in the first place.

Note: make sure you already have the DLL or OCX file available before trying these methods.

Using the elevated command to register a DLL or OCX file

  1. Hold down the Windows key and press S to open the search function. Type cmd, right click and choose Run as administrator option

    Note: You can also press Alt + Shift + Enter after typing cmd in search function. cmd1-9476635Elevated command line opening

  2. Now type the following command to register the DLL or OCX file.

    regsvr32 jscript.dll

    Note: jscript.dll is the file name that you can change to any file you want to register.

    cmd2-5090459DLL file registered successfully

  3. You can also register a DLL or OCX file that is in a different location by typing the following command.

    regsvr32 C:UsersKevinDesktopjscript.dll

    cmd3-3354002Register DLL in a different path

  4. If the file cannot be registered, you might get the error shown below: cmd4-4729337Do not register

  5. Sometimes, The error may be caused by trying to register a DLL or OCX file from 32 bits through the Regsvr32 of 64 bits. You must use the Regsvr32 from 32 bits found in the Syswow64 folder.

  6. You can type the following command to register the DLL 32 bits or the OCX in an operating system of 64 bits.

    %SystemRoot%SysWOW64regsvr32 jscript.dll

    cmd5-4587833Registering a DLL 32 bits in Windows of 64 bits

You can also use PowerShell with the same commands to register DLL or OCX files.

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.