Unable to register the DLL/OCX: RegSvr32 failed with exit code 0xC0000005 with Inno Setup 5.2.3

inno-setupprivilegesregsvr32

I am trying to register a COM DLL using Inno Setup in a setup package I created. During test installations on Vista, I get this error:

Unable to register the DLL/OCX: RegSvr32 failed with exit code 0xC0000005

I click "Ignore" and my application appears to install, but I have to then open a command prompt (as an administrator) and then regsvr32 to install the COM DLL. Is there any way to do this automatically in Inno Setup?

Best Answer

Don't use self-registration (i.e. regsvr32), Microsoft provides more information on the reasons why in the Windows Installer documentation.

Most commonly, certain dependencies that your application is looking for are not yet present (i.e. Microsoft DLLs deployed with your app) when the self-registration process happens.

Can InnoSetup write registry entries? That's all that regsvr32 is accomplishing... you can use the WiX tool heat to extract the relevant registry information that regsvr32 would put in place and then hand-port that back to InnoSetup code.

Related Topic