views:

1849

answers:

3

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?

A: 

I have same problem.

sandy
+1  A: 

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.

sascha
Are you sure about this? Inno Setup can't really use anything but `regsvr32` to install a DLL or OCX, any Windows Installer features don't really help here IMO.
mghie
Can't 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.
sascha
@sascha: That's interesting information; put that into your answer and I'll vote it up. Inno Setup surely can write to the registry. But I don't think that it will affect the problem the OP has, which looks more like a permission issue, in which case writing to the registry would probably fail as well.
mghie
@mghie done :-)
sascha
A: 

0xC0000005 = EXCEPTION_ACCESS_VIOLATION

The DLL is doing something that is causing regsvr32 to crash.

Jordan Russell