简体   繁体   English

Wix安装程序维护

[英]Wix Installer Maintenance

If I execute a Wix installer for first time it will install as expected. 如果我是第一次执行Wix安装程序,它将按预期安装。

If I re-run the installer it correctly enters maintenance mode (Repair/Change/Modify) 如果我重新运行安装程序,它会正确进入维护模式(修复/更改/修改)

However if I re-compile the installer between the initial install and the re-run, it treats it as new installer. 但是,如果我在初始安装和重新运行之间重新编译安装程序,则将其视为新安装程序。 I have tried using the same Product Id but when the newly compiled installer is executed, I then get a message saying it has already been installed and must un-install the previous version. 我尝试使用相同的产品ID,但是当执行新编译的安装程序时,我会收到一条消息,指出它已经安装,必须卸载以前的版本。

As part of our development I am trying to resolve some issues with the Maintenance UI and don't want to have to run the installer twice every time I wish to debug the maintenance wizard. 作为我们开发的一部分,我试图解决维护UI的某些问题,并且不想每次希望调试维护向导时都必须运行安装程序两次。 I would like the re-compiled installer to be treated as if it were the original installer. 我希望将重新编译的安装程序视为原始安装程序。

Thanks for any pointers you may be able to throw at me, or other suitable resource 感谢您的指点,您可能会向我投掷,或者提供其他合适的资源

Technically this is not something that you should do. 从技术上讲,这不是您应该做的事情。 By rebuilding, you are altering the package, which means it is supposed to have a new package code. 通过重建,您正在更改程序包,这意味着它应该具有新的程序包代码。 When it has a new package code, but matching product code and version, it is a small update . 当它具有新的程序包代码,但与产品代码和版本匹配时,这是一个小的更新 You can skip the uninstall and install by instead performing a reinstall via msiexec /fvomus your.msi or msiexec /i your.msi REINSTALL=ALL REINSTALLMODE=vomus . 您可以跳过卸载并安装,而可以通过msiexec /fvomus your.msimsiexec /i your.msi REINSTALL=ALL REINSTALLMODE=vomus

As another approach, if what you are testing doesn't depend heavily on machine state, you can tweak some of the entry conditions for the maintenance UI such that it occurs on a first-time installation, and ensure that the package cannot install. 作为另一种方法,如果您要测试的内容在很大程度上不依赖于计算机状态,则可以调整维护UI的某些输入条件,使其在首次安装时出现,并确保该软件包无法安装。 This puts you in a simpler reproduction loop, but will require transplanting your finished code back to the real scenario. 这使您处于一个更简单的再现循环中,但是将需要将完成的代码移植回真实场景。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM