Wix 卸载完成后打开网页
我用的是Wix3。当用户卸载产品时,我需要打开一个网页。
有什么想法可以做到吗?
谢谢。
I'm using Wix3. I need to open a web page when the user uninstalls the product.
Any ideas how it can be done?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这是我们使用的代码示例,我们实际上并没有在编译时设置 URL,而是在 MSI 构建后更新属性,因此这可能看起来有点“过度设计”。我们使用 WiXShellExec CA 并有一个附加条件,以便仅在卸载期间显示网页,而不是在主要升级期间显示网页。
Here's a sample of the code we use, we don't actually set the URL at compile time, but update properties in the MSI post-build so this might seem a little "over engineered". We use the WiXShellExec CA and have an additional condition so that the webpage is only displayed during uninstall, and not during a major upgrade.
将这些 XML 元素添加到
元素下的某处:REMOVE="ALL"
条件将确保仅在产品完全删除时才执行自定义操作。After="InstallValidate"
确保在 REMOVE 属性 值变为已知。Add these XML elements somewhere under your
<Product>
element:The
REMOVE="ALL"
condition will make sure the custom action is executed only if the product is being completely removed.The
After="InstallValidate"
makes sure that the custom action is executed right after the REMOVE property value becomes known.FireGiant 提供的示例 启动 Internet 对我不起作用,但它激励我提出自己的解决方案,如下所示。
条件未安装表示新安装,而已安装表示仅在卸载时触发。
The example provided by FireGiant Launch the Internet doesn't work for me but it inspire me to come out my own solution as below.
The condition NOT Installed mean new installation while Installed means it only trigger when uninstall.
这是我对安装和卸载所做的操作:
Here is what I did for both install and uninstall: