Disable MSI auto-repair on installed program

瘦欲@ 提交于 2020-12-23 13:40:30

问题


I've seen tons of people post about this issue but have yet to find a solution. I have a program that every once and a while will have an issue where the windows installer tries to repair the program, but it doesn't actually do anything, it just hangs. I checked the Windows event log and the file it says is missing is not missing. Sometimes rebooting fixes it.

How can I disable the self repair completely on a program that's already installed without removing it completely from the registry? And how can I prevent future installations from having this problem? Thanks


回答1:


Intel: Can you please summarize what kind of application this is? Does it have COM components? Does it feature GAC installation? Does it have services? Does it have a lot of registry information? Is it your own package or a third party package? Etc...

Self-Repair: This is a big issue, but a simple problem. The most concise explanation is probably this one: Why does the MSI installer reconfigure if I delete a file? (recommended).

Essentially: Windows Installer tries to maintain the files that were originally installed.


External Causes: Self-repair usually have 3 main causes: 1) Badly designed MSI packages with design flaws, 2) Interference from external causes ranging from malware, to admin scripts to anything on the system that changes "something" - really, and 3) Windows Design changes that trigger unexpected errors in legacy packages.

More here in section: "The Primary Causes of Self-Repair". Given the intermittent nature of your problem it could be a security software problem?


Blank GUIDs: There is a method where you can install the files via components that has a blank GUID. Then they are simply installed and never checked again. This should eliminate self-repair problems, however it also means the file will never be updated.

Other "Solutions": You must not try to disable the Windows Installer service or such things to resolve this problem, please try these pragmatic suggestions instead: Self-repair - finding real-world solutions (section 5). You can for example use non-advertised shortcuts, sort out COM registration issues, etc... There is also this piece on the issue: How do I avoid triggering MSI self-repair with my WiX / MSI package? (recommended).


Recent answer on a similar issue.


Self-Repair In Detail: More than anyone wants to know about self-repair. This is a section I created before, including it for its "glanceability":

  1. Self-repair - explained
  2. Self-repair - finding real-world solutions (third party packages)
  3. Self-repair - how to avoid it in your own package (your own packages)

Links:

  • Similar: Visual Studio 2015 msi build initiates another installation
  • RestartManager causes worker role to restart
  • What is the use of Repair option in a msi installer and what does it really do (internally)?
  • Disable MSI auto-repair on installed program


来源:https://stackoverflow.com/questions/57715332/disable-msi-auto-repair-on-installed-program

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