本文介绍了在 msi 安装程序中修复选项的用途是什么,它真正做了什么(内部)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I have a software package deployed using WIX. When I run the installer again after installing, it gives as option to repair, what does it exactly do?

解决方案

Repair: If the question is what repair does, then it checks all component key-paths for the installed product and installs any components that may be missing - for some reason. In essence your product is just checked for being completely installed and then errors are fixed up.

There are some issues with repair resetting registry values unexpectedly that you should be aware of. This problem and a number of other, common problems with MSI are described here (very messy overview, but maybe have a skim if you see any relevant problems you recognize): How do I avoid common design flaws in my WiX / MSI deployment solution?


Self-Repair: You may also have triggered a Windows Installer self-repair because of a design error in your WiX source file / MSI output file.

This is a repair happening on its own without you running the installer again yourself - or kicking it off from Add/Remove programs. Rather it is automatically invoked via certain "advertised entry points" that trigger a key-path check auto-magically. For example the act of launching an advertised shortcut or invoking a COM class and a few other types of actions (see linked content).

I have written about self-repair too many times, I will just link to existing answers. Please try the last one first (how to avoid it in your own package):

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

If the issue is not self-repair, then you should know that when you run your installer again it is normal to get a modify / repair dialog because the product is already installed. It is the correct behavior.


Links:

这篇关于在 msi 安装程序中修复选项的用途是什么,它真正做了什么(内部)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-08 05:07