卸载完成时打开网页 [英] Wix Open web page when uninstall completes

查看:33
本文介绍了卸载完成时打开网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 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?

谢谢.

推荐答案

这是我们使用的代码示例,我们实际上并没有在编译时设置 URL,而是在 MSI post-build 中更新属性,因此这可能似乎有点过度设计".我们使用 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.

<Fragment>
    <Property Id="MyURL"><![CDATA[http://www.blah.blah.blah/]]></Property>
    <CustomAction Id="SetOpenURL" Property="WixShellExecTarget" Value="[MyURL]" />
    <CustomAction Id="OpenURL" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" Return="ignore" />

    <InstallExecuteSequence>
        <!-- Launch webpage during full uninstall, but not upgrade -->
        <Custom Action="SetOpenURL" After="InstallFinalize"><![CDATA[REMOVE ~= "ALL" AND NOT UPGRADINGPRODUCTCODE]]></Custom>
        <Custom Action="OpenURL" After="SetOpenURL"><![CDATA[REMOVE ~= "ALL" AND NOT UPGRADINGPRODUCTCODE]]></Custom>
    </InstallExecuteSequence>
</Fragment>

这篇关于卸载完成时打开网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆