2017-02-09 6 views
0

アプリのインストールとアンインストール時に異なるURLを開こうとしています。現在のところ、このセットアップではアンインストール時に両方のURLが開きますが、インストール時には何も表示されませWix:インストール時とアンインストール時に別のURLを開く

<Property Id="InstallURL">$(var.HomepageURL)install?ver=$(var.VersionNumber)</Property> 
<Property Id="UninstallURL">$(var.HomepageURL)uninstall?ver=$(var.VersionNumber)</Property> 

<CustomAction Id="SetOpenInstallURL" Property="WixShellExecTarget" Value="[InstallURL]" /> 
<CustomAction Id="SetOpenUninstallURL" Property="WixShellExecTarget" Value="[UninstallURL]" /> 

<CustomAction Id="OpenInstallURL" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" Return="ignore" /> 
<CustomAction Id="OpenUninstallURL" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" Return="ignore" /> 

<InstallExecuteSequence> 
    <!-- Launch webpage during install --> 
    <Custom Action='SetOpenInstallURL' After='InstallFinalize'><![CDATA[Installed]]></Custom> 
    <Custom Action="OpenInstallURL" After="SetOpenInstallURL"></Custom> 
</InstallExecuteSequence> 

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

答えて

0

別の試みhttps://gist.github.com/raspi/7072ecdb43d929901e3d228893cfa124

<Property Id="InstallURL">$(var.HomepageURL)install?ver=$(var.VersionNumber)</Property> 
<Property Id="UninstallURL">$(var.HomepageURL)uninstall?ver=$(var.VersionNumber)</Property> 

<!-- Set value of WixShellExecTarget property to value of InstallURL if this is first time install --> 
<SetProperty Id="WixShellExecTarget" Action="SetInstallURL" Value="[InstallURL]" Before="OpenURL" Sequence="execute">NOT Installed</SetProperty> 
<!-- Set value of WixShellExecTarget property to value of UninstallURL if this is uninstall --> 
<SetProperty Id="WixShellExecTarget" Action="SetUninstallURL" Value="[UninstallURL]" Before="OpenURL" Sequence="execute">REMOVE</SetProperty> 

<CustomAction Id="OpenURL" BinaryKey="WixCA" DllEntry="WixShellExec" Return="ignore" /> 

<InstallExecuteSequence> 
    <Custom Action="OpenURL" After="InstallFinalize"/> 
</InstallExecuteSequence> 
+0

でMSIログを調査した後、これができます**エラーCNDL0072:カスタム要素は**属性、またはシーケンス属性の後、属性の前に持っている必要があります。 'After =" InstallFinalize "を追加しようとするとエラーが発生します** light.exe:error LGHT0001:存在しないBeforeアクションを持つActionRowを見つけました:OpenURL **。 Wix v3.10.3.3007を使用しています。 – raspi

+0

編集後:どちらのソリューションもインストールまたはアンインストール時にURLを開けません。 – raspi

+0

@raspi、あなたのインストールセッションのmsiログを共有できますか? –

関連する問題