开发者

WiX/Windows Installer: Re-install to a new folder

开发者 https://www.devze.com 2022-12-23 05:37 出处:网络
1. I am using WiX for cre开发者_运维问答ating installer and would like to implement the following behaviour:

1. I am using WiX for cre开发者_运维问答ating installer and would like to implement the following behaviour: If a user launches msi installer for the product and the product already installed, then wizard works similar to pure (first time) installation with exception of some things (e.g. license aggrement screen is omitted). The wizard should allow for example to change installation folder, select whether to place desktop shortcut,... I tried to do:

<Publish Event="ReinstallMode" Value="amus"><![CDATA[INSTALL_MODE = "Change"]]></Publish>
<Publish Event="Reinstall" Value="ALL"><![CDATA[INSTALL_MODE = "Change"]]></Publish>

But after installation completes: the product is in the same folder, where it was installed first time; desktop icon in the same state as it was after first time install. MSDN says: "Do not attempt to change the target directory path if some components that use the path are already installed for the current user or for a different user". Is there a way to re-install in another forlder and add/remove desktop icon in re-install?

2. Is this normal to use the same KeyPath for some components? For example the same registry values for DeskTop and Programs menu shortcuts? MSDN says: "Two components cannot share the same key path value". But compiling and verifying goes OK. And I did not discover problems using the same keypaths.


  1. I'm not sure I understood your requirements correctly, but it seems the Major Upgrades cover the functionality you need.

  2. Take a look at this ancient ;-), but still valuable blog entry by Rob Mensching. The KeyPath concept is clearly explained on an example there.

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消