How to cope with Install error 1920 about winsxs merge modules in Vista and 7?

305 Views Asked by At

When I try to install my msi package I get an error only in Vista and 7. "Error 1920. Service ... (...) failed to start. Verify that you have sufficent privileges to start system services"

I get this error in Vista or 7 if I build my setup with C++ 9 CRT Winsxs MSM merge module

If I use C and C++ 7 runtime libraries it doesn't have this problem, but I must build my exe with old versions of MS Visual Studio.

Does anyone have idea how can I cope with that?

1

There are 1 best solutions below

0
On

As a general rule of thumb, you shouldn't depend on files you're installing within your installer. For example, what if a file-in-use problem on the client machine required a reboot for the new file to be placed? Or what if some component you need also requires configuration data to be registered, which won't happen until a reboot or logon/logoff? Subsequent operations of your installer would erroneously be using an unexpected environment.

I have strong opinions against static linking for security reasons, codepage sharing, etc, but in the special case of installers, I'd recommend that you do statically link the CRT, so that it's guaranteed to be available during the install.