A DLL, also known as Dynamic Link Library, is typically a set of shared code libraries that can be used by multiple programs or applications implementing common functionalities.

System DLL files may manage memory, monitor resources, or control interface actions. The predefined set of functions within any DLL can be shared by several concurrently running programs.

In Windows, most of the preinstalled DLL files are kept in the Windows directory by default. Many of which are very crucial for the proper functioning of the operating system.

On installing Windows, the preinstalled DLL files are automatically registered with the operating system. A similar process happens when installing any third-party software. However, due to faulty registration, file corruption, hard drive failure, or security breach, you may require to manually register a DLL file for related programs to function correctly.

Register a DLL

In order to register a DLL file with an operating system registry, follow the below-given steps correctly.

Step 1

Start the Command Prompt by going to Start > Run and typing “cmd” (without quotes). Since many DLL files require administrative privileges to register, it is recommended that you start the Command Prompt in administrative mode from the very beginning, irrespective of the DLL file to be registered.

To start the Command Prompt in “administrative mode”, open the Search programs dialog (not Run dialog) in the Start Menu, type cmd or cmd.exe and press CTRL + SHIFT + ENTER together. This will start the Command Prompt in administrative mode (Administrator will be written in the window’s title bar).

Step 2

Run the following command in the Command Prompt.

[sourcecode language=”text”]
regsvr32 <filepath>
[/sourcecode]

Where file path is the path to the DLL file. For example: if you wish to register a file called mysample.dll residing in C:\\windows\\system32 then you execute the command as follows,

[sourcecode language=”text”]
regsvr32 C:\\windows\\system32\\mysample.dll
[/sourcecode]

The detailedregsvr32 command with additional parameters is as follows:

You can also register ActiveX Controls (OCX) file using the same command.

Note: On a Windows operating system of the 64-bit version, there are two versions of the Regsv32.exe file:
– 64-bit version is %systemroot%\\System32\\regsvr32.exe
– 32-bit version is %systemroot%\\SysWoW64\\regsvr32.exe

Similarly, you can also unregister any DLL or OCX file using the below command.

[sourcecode language=”text”]
regsvr32 /u <filepath>
[/sourcecode]

Few examples,

[sourcecode language=”text”]
regsvr32 /u C:\Windows\System32\zipfldr.dll
regsvr32 /u C:\Windows\System32\cabview.dll
regsvr32 zipfldr.dll
regsvr32 cabview.dll
regsvr32 /s wuapi.dll
regsvr32 /s wuaueng1.dll
regsvr32 /s wuaueng.dll
regsvr32 /s wucltui.dll
regsvr32 /s wups2.dll
regsvr32 /s wups.dll
regsvr32 /s wuweb.dll
[/sourcecode]

Did you try to register a DLL? If yes, which one did you face any issues?