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

半腔热情 提交于 2019-12-10 11:50:17

问题


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:


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.



来源:https://stackoverflow.com/questions/3617689/how-to-cope-with-install-error-1920-about-winsxs-merge-modules-in-vista-and-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!