DllRegisterServer failed with the error code 0x80040201


Issue: Often when you try to register a DLL on Win7 or windows server 2008, you run into an error

     "The module scmt.dll was loaded but the call to DllRegisterServer failed with the error code 0x80040201"


Why: UAC (user account control) limits the ability to register the DLL. so you have to run the command on elevated command prompt using Admin role.


Fix: Run the command in an elevated mode

   1. Click on Start button > type Command Prompt > (right click command prompt and click run as Administrator)

   2. Deregister the DLL using the following command 

                         cmd> "regsvr32 /u scmt.dll"

   3. Reregister the DLL using the command

                         cmd > "regsvr32 scmt.dll"

   you will get the below dialog box.