Resolve: DllUnregisterServer Failed with Error Code 0x80040200

Windows users reported a RegSvr32 error `DllUnregisterServer failed with error code 0x80040200` when they tried to register or unregister a DLL file when installing an application that automatically registers a DLL file.

The detailed error message from RegSvr32 is as follows:

Module xxx was loaded, but the DllUnregisterServer failed with error code 0x80040200.
You can find more information about this problem on the Internet by using the error code as a search term.

What is the reason for the “DllUnregisterServer Failed with Error Code 0x80040200” problem?

In this section, we will discuss the reasons that may cause `DllUnregisterServer Failed with Error Code 0x80040200′. We discuss the causes of the problem mainly because it becomes very easy to solve the problem when you know the possible causes.

So far, the developers have not identified a specific cause, so we can only speculate about the causes of DllUnregisterServer Failed with Error Code 0x80040200`. Here are some very common reasons that can cause this error.

  • System freezes
  • Not enough resolution
  • Not enough information loaded
  • Ocx file

How to solve the “DllUnregisterServer Failed with Error Code 0x80040200” error?

Re-registering a file after installing a program

If you see this error when trying to install an application, it’s probably due to incorrectly loaded dependencies.

In this case, you can probably get around the problem by running the installer with administrator privileges and then manually unregistering and re-registering the failed dependency.

If this script applies, follow the instructions below to run the installer with administrator privileges, and then re-register the failed dependency:

  1. Open File Explorer and navigate to the location of the failed installer.
  2. Right-click and select Run as administrator on the context menu that appears.
  3. Follow the instructions on the screen to complete the installation.
  4. Don’t worry if you see the same error 0x80040200 – just close the error window and go to the next step.
  5. Open the “Run” dialog box by pressing the Windows + R keys.
  6. Then type “cmd” in the text box and press Ctrl + Shift + Enter to open the extended CMD prompt.
  7. While in the command line terminal, type the following commands in order, hitting Enter after each command to disable the OCX dependency, and then re-register:
    spr32x30.ocx /UNREGISTER
    spr32x30.ocx /REGSERVER
  8. Restart your computer and see if the problem is resolved the next time you start your computer.

Unregister the DLL file with administrator access

If you see this error when you try to manually unregister a DLL file, you are probably seeing error 0x80040200 because you do not have sufficient access rights. If this script applies, you can completely avoid this error message by using the “regsvr32” command on the extended command line.

If you haven’t tried this yet, follow the instructions below to try to manually unregister the DLL file from the raised CMD line:

  1. Press the Windows + R key to open the Run dialog box.
  2. Then type “cmd” in the text box and press Ctrl + Shift + Enter to open the CMD prompt.
  3. When UAC (User Account Control) is displayed, click “Yes” to grant administrator privileges.
  4. Once you are at the extended CMD prompt, type the following command and press Enter to manually unregister the .DLL file:
    regsvr32 /u *DLL File*
  5. Note that the *dll-file* is only a replacement. You must replace it with the name and extension of the DLL file you want to unregister. For example, we want to unregister the file cdo32.dll, so we use the command regsvr32 /u cdo32.dll.
  6. If the operation completes successfully without error code 0x80040200, restart your computer and then complete the installation that caused the problem earlier.