How to Register and Unregister DLL Files Using RegSvr32 in Windows

Use RegSvr32 to register or unregister COM DLL files in Windows. Step-by-step with 32/64-bit specifics and troubleshooting tips.

Sponsored

Why some DLL files need registration

Certain DLLs are COM components (for example, shell extensions or ActiveX controls). These must be registered so Windows knows their class IDs and how to load them. Regular app DLLs usually do not require registration—most can be fixed simply by installing the DLL file. If your software specifically asks you to “register a DLL,” follow the steps below.

Open Command Prompt (Admin)

Open Command Prompt as Administrator.

Open Command Prompt as Administrator
Run CMD as Administrator to use RegSvr32.

Register a DLL

To register DLL files, run RegSvr32 (32-bit or 64-bit) that matches the DLL.

  • 64-bit DLLs (full path):
    %SystemRoot%\System32\regsvr32.exe "C:\Path\To\Your64.dll"
  • 32-bit DLLs (full path):
    %SystemRoot%\SysWOW64\regsvr32.exe "C:\Path\To\Your32.dll"
  • From the DLL’s folder (64-bit):
    cd /d "C:\Path\To\Folder"
    %SystemRoot%\System32\regsvr32.exe "YourLib.dll"
  • From the DLL’s folder (32-bit):
    cd /d "C:\Path\To\Folder"
    %SystemRoot%\SysWOW64\regsvr32.exe "YourLib.dll"
  • Install hook (rare): for components that support DllInstall
    %SystemRoot%\System32\regsvr32.exe /i "C:\Path\To\Component.dll"

You’ll see a confirmation dialog on success.

Unregister a DLL

%SystemRoot%\System32\regsvr32.exe /u "C:\Path\To\Your64.dll"
%SystemRoot%\SysWOW64\regsvr32.exe /u "C:\Path\To\Your32.dll"

Use the same 32/64-bit edition that was used to register it.

Troubleshooting common errors

  • “DllRegisterServer not found” — Not a COM library. Registration doesn’t apply. Install the DLL in the app folder instead.
  • “The module … failed to load” / “module not found” — A dependency is missing. Install the required Visual C++/.NET/DirectX packages or place dependent DLLs alongside.
  • 32/64-bit mismatch — Register 32-bit DLLs with SysWOW64\regsvr32.exe and 64-bit DLLs with System32\regsvr32.exe.
  • Access denied — Re-open CMD as Administrator; ensure the file isn’t locked by antivirus (check Quarantine).