71

When I tried to register a COM DLL,

regsvr32 rpcrt4.dll

I get the following error message:

`The module "c:\windows\system 32\"rpcrt4.dll" was loaded but the call to DllRegisterServer failed with error code 0X80070006.

How do I fix this problem? Please help.

dotnet-practitioner
  • 13,968
  • 36
  • 127
  • 200

3 Answers3

123

According to this: http://www.vistax64.com/vista-installation-setup/33219-regsvr32-error-0x80004005.html

Run it in a elevated command prompt.

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
  • I got error 80004005 trying to register a certain msmpeg2enc.dll that is found windows\system32. (Running Windows 10 build 10074) Even when running from an elevated command prompt. – Aaron Campbell May 13 '15 at 04:53
  • 1
    Has to be the worst error message ever and the simplest fix. – ste-fu Sep 12 '16 at 10:45
36

Open the start menu and type cmd into the search box Hold Ctrl + Shift and press Enter

This runs the Command Prompt in Administrator mode.

Now type regsvr32 MyComobject.dll

Michael Blood
  • 1,257
  • 10
  • 11
  • IMHO that's the best anwswer. You cannot run cmd as `runas /user:Administrator cmd.exe` This will not be enough. You should use this method you explained. +1 for that – jyz Aug 15 '13 at 01:44
4

Use following command should work on windows 7. don't forget to enclose the dll name with full path in double quotations.

C:\Windows\SysWOW64>regsvr32 "c:\dll.name" 
andrewsi
  • 10,807
  • 132
  • 35
  • 51
Sahayaan
  • 49
  • 1