我正在使用具有「安裝後啓動應用程序」複選框的WiX進行安裝。 目標是對設置複選框以及取消複選框的反應。如果複選框已設置,我需要運行一個應用程序。如果複選框沒有設置,我需要運行相同的應用程序,但使用命令行參數。WiX:無法處理「在安裝後啓動應用程序」複選框= 0
這是我的WiX腳本的一部分。
<CustomAction Id="StartConfigManagerOnExit"
FileKey="ParamsShower.exe"
ExeCommand=""
Execute="immediate"
Impersonate="yes"
Return="asyncNoWait" />
<CustomAction Id="StartUpgradeConfigOnExit"
FileKey="ParamsShower.exe"
ExeCommand="/upgrade"
Execute="immediate"
Impersonate="yes"
Return="asyncNoWait" />
<UI>
<Publish Dialog="ExitDialogEx"
Control="Finish"
Order="1"
Event="DoAction"
Value="StartConfigManagerOnExit">LAUNCHAPPONEXIT = 1</Publish>
<Publish Dialog="ExitDialogEx"
Control="Finish"
Order="1"
Event="DoAction"
Value="StartUpgradeConfigOnExit">LAUNCHAPPONEXIT = 0</Publish>
<Publish Dialog="ExitDialogEx"
Control="Finish"
Event="EndDialog"
Value="Return"
Order="999">1</Publish>
<Dialog Id="ExitDialogEx"
Width="370"
Height="270"
Title="[ProductName] Setup">
<Control Id="LaunchCheckBox"
Type="CheckBox"
X="135"
Y="190"
Width="220"
Height="40"
Property="LAUNCHAPPONEXIT"
Hidden="yes"
CheckBoxValue="1"
Text="Launch an app">
<Condition Action="show">NOT Installed</Condition>
</Control>
</Dialog>
<InstallUISequence>
<Show Dialog="ExitDialogEx"
OnExit="success" />
</InstallUISequence>
<AdminUISequence>
<Show Dialog="ExitDialogEx"
OnExit="success" />
</AdminUISequence>
</UI>
當設置LaunchCheckBox時,安裝程序啓動應用程序。但是如果沒有設置複選框,它不會運行它。
我已將 設置爲。 現在,如果複選框已設置,則啓動StartUpgradeConfigOnExit(LAUNCHAPPONEXIT = 0)。如果複選框未設置,則不發生任何事情。 –
Maxs
2010-02-16 12:30:12