Wix运行自定义操作当"安装较新版本"

时间:2017-02-27 06:18:23

标签: wix custom-action

如何在安装完成时使用&#34设置自定义操作来运行我的应用程序;已经安装了较新的版本"?

我想要的是:如果安装了较新的版本,只需运行即可。除了删除外,始终运行应用程序。

我的配置:

<CustomAction Id="LaunchApplication" Directory='INSTALLFOLDER' ExeCommand="[INSTALLFOLDER]\MyApp.exe"
              Return="asyncNoWait" />

<InstallExecuteSequence>
  <Custom Action="LaunchApplication" After="InstallFinalize">NOT (REMOVE="ALL")</Custom>
</InstallExecuteSequence>

由于

1 个答案:

答案 0 :(得分:0)

解决日志:SELECT ATTRIBUTE, COUNT(*) FROM YOUR_TABLE GROUP BY ATTRIBUTE;

工作配置:

app.msi /l*v log.txt

操作LaunchApplication在安装/更新完成时执行 当FindRelatedProducts Action找到更新版本的产品时,安装失败时执行ActionApplicationOnDowngrade

我使用<CustomAction Id="LaunchApplication" Directory='INSTALLFOLDER' ExeCommand="[INSTALLFOLDER]\MyApp.exe" Return="asyncNoWait" /> <CustomAction Id="SetLaunchApplicationPath" Property="LaunchApplicationPath" Value="[ProgramFilesFolder][Manufacturer]\[ProductName]\MyApp.exe"> </CustomAction> <CustomAction Id="LaunchApplicationOnDowngrade" ExeCommand="[SetLaunchApplicationPath]" Property="LaunchApplicationPath" Return="asyncNoWait" /> <InstallUISequence > <Custom Action="SetLaunchApplicationPath" After="FindRelatedProducts">WIX_DOWNGRADE_DETECTED</Custom> <Custom Action="LaunchApplicationOnDowngrade" After="SetLaunchApplicationPath">LaunchApplicationPath</Custom> </InstallUISequence> <InstallExecuteSequence> <Custom Action="LaunchApplication" After="InstallFinalize" >NOT (REMOVE="ALL")</Custom> </InstallExecuteSequence> 配置升级。