cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jimd68
Level 3

Error 1904 registering ocx in 64 bit builds (Vista and Windows Server 2008)

I have an installscript msi project. It was upgraded from devstudio9 to installshield 2009 and installshield 2010. It builds installs for 64 bit installations. I set one component to self register and it works for XP 64 but not windows server 2008 64 or vista business 64. I've tried not self registering and running regsvr32 at the end of the installation from the script without any luck. I've tried disabling the UAC and still no luck. The only way I can get the file to register is to manually register it.

The error is "error 1904... HRESULT -2147010895"

Any ideas, I've searched all over this site and could not find a solution.
Labels (1)
0 Kudos
(3) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The error detail from the posted HRESULT provides this information: "The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail."

If you are attempting to self-register a file that depends on Win32 side-by-side assemblies like the Visual C++ runtime, the assemblies are not committed to the machine until after InstallFinalize runs. Since all self-registration actions run before InstallFinalize commits the installation, the dependencies required to load the DLL will not be available yet on the machine, causing the registration to fail.

You can resolve this issue in a number of ways:
- Use COM extraction instead of self-registration to register the DLL.
- Install the Visual C++ runtime with the redistributable executable as a setup prerequisite instead of using the merge modules.
- Statically link the DLLs to the C++ runtime instead of dynamically linking.

More information can be found here:
http://blogs.msdn.com/astebner/archive/2007/01/09/problems-with-custom-actions-that-depend-on-the-visual-c-8-0-runtime-files-on-windows-vista.aspx
0 Kudos
jimd68
Level 3

Can I self-register after installfinalize?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

You could run an executable custom action that launches regsrv32 after InstallFinalize, but this action will not run with elevated privileges unless the whole setup (i.e. setup.exe) is run as administrator.
0 Kudos