regsvr32: What It Is & How to Register DLLs

How to register & unregister a DLL file with regsvr32.exe

regsvr32 is a command-line tool in Windows that stands for Microsoft Register Server. It's used to register and unregister Object Linking and Embedding (OLE) controls like .DLL files and ActiveX Control .OCX files.

When regsvr32 registers a DLL file, information about its associated program files is added to the Windows Registry. It's those references that other programs can access in the registry to understand where the program data is and how to interact with it.

You may need to register a DLL file if you're seeing a DLL error on your computer. We explain how to do that below.

These steps apply to Windows 10 through Windows XP.

How to Register and Unregister a DLL File

If the references in the Windows Registry that refer to the DLL file are somehow removed or corrupted, programs that need to use that DLL file may stop working. It's when this association with the registry is broken that a DLL file should be registered.

Registering a DLL file is typically accomplished by reinstalling the program that registered it in the first place. Sometimes, however, you may have to register the DLL file yourself manually via the Command Prompt.

See our tutorial on how to open Command Prompt if you're not sure how to find it.

This is the correct way to structure a regsvr32 command:

regsvr32 [/u] [/n] [/i[:cmdline]]

For example, you'd enter this first command to register a DLL file named myfile.dll, or the second to unregister it:

regsvr32 myfile.dll
regsvr32 /u myfile.dll

regsvr32 succeeded message in Windows 10

Not all DLLs can be registered by just entering the command above into a Command Prompt. You might need to first close down the service or program that's using the file.

How to Fix Common Regsvr32 Errors

Here's one error you might see when trying to register a DLL file:

The module was loaded but the call to DllRegisterServer failed with error code 0x80070005.

This is typically a permission issue. If running an elevated Command Prompt still doesn't let you register the DLL file, the file itself might be blocked. Check the Security section of the General tab in the file's Properties window.

Another possible issue could be that you don't have the correct permissions to use the file.

A similar error message is worded like the one below. This error typically means that the DLL is not being used as a COM DLL for any application on the computer, which means there's no need to register it.

The module was loaded but the entry-point DllRegisterServer was not found.

Here's another regsvr32 error message:

The module failed to load. Make sure the binary is stored at the specified path or debug it to check for problems with the binary or dependent .DLL files. The specified module could not be found.

regsvr32 module failed to load error in Windows 10

That particular error might be due to a missing dependency, in which case you can use the Dependency Walker tool to see a list of all the dependencies that the DLL file requires as one may be missing that you need to have in order for the DLL to register correctly.

Also, make sure that the path to the DLL file is spelled right. The syntax of the command is very important; an error may be thrown if it's not entered correctly.

Some DLL files may need to have their location surrounded in quotes like this:

"C:\Users\Admin User\Programs\myfile.dll"

Where Is Regsvr32.exe Stored?

32-bit versions of Windows (XP and newer) add the Microsoft Register Server tool to this folder when Windows is first installed:


64-bit versions of Windows store the regsvr32.exe file not only there but also in this folder: