如果在Finish Dialog 中 加入 Launch

本文介绍如何在安装程序的最后阶段添加启动应用程序的功能,并提供定制提示的方法。通过设置特定变量,用户可以在安装完成后选择立即运行目标软件。

如果在Finish Dialog 中 加入 Launch

如果想在安装完成的最后加入 Launch 功能,则可以设置变量 VAR_S_LAUNCH_CMD ,
如设置其值为: [PATH_S_TARGETDIR]/MyApp.exe , 则在安装完成的 FinishDialog 的
界面中就会出现一个 Check Buttion , 提示是否马上运行 [MyAppName],
如果选中,则就会自动运行 [PATH_S_TARGETDIR]/MyApp.exe

*如果想修改 提示的内容,只要设置 VAR_S_LAUNCH_PROMPT 的值就可以了

*NextInstaller( InstallAide ) 2.7 及以上才有这个功能:http://www.installaide.com/Download.asp

<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui" xmlns:netfx="http://wixtoolset.org/schemas/v4/wxs/netfx" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> <Package Name="IPP" Manufacturer="Build-up trading Co.LTD." Version="1.1.1" UpgradeCode="{F7D6C416-BC98-43A8-A9F7-0028BE027CC0}"> <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" /> <MediaTemplate EmbedCab="yes" /> <Icon Id="ipp.exe" SourceFile="resources\print.ico" /> <Property Id="ARPPRODUCTVERSION" Value="1.1.1" /> <Property Id="ARPPRODUCTICON" Value="ipp.exe" /> <Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" /> <Property Id="TOKEN" Secure="yes" /> <Property Id="DefaultUIFont" Value="WixUI_Font_Normal"></Property> <UI> <TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" /> <TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" /> <TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" /> <TextStyle Id="WixUI_Font_Biggest" FaceName="Tahoma" Size="14" /> <DialogRef Id="DiskCostDlg" /> <DialogRef Id="ErrorDlg" /> <DialogRef Id="FatalError" /> <DialogRef Id="FilesInUse" /> <DialogRef Id="LicenseAgreementDlg" /> <DialogRef Id="PrepareDlg" /> <DialogRef Id="ProgressDlg" /> <DialogRef Id="ResumeDlg" /> <DialogRef Id="UserExit" /> <DialogRef Id="ExitDialog" /> <DialogRef Id="WelcomeDlg" /> <DialogRef Id="VerifyReadyDlg" /> <DialogRef Id="CancelDlg" /> <DialogRef Id="MaintenanceTypeDlg" /> <DialogRef Id="WaitForCostingDlg" /> <!-- 自定义对话框定义 --> <Dialog Id="TokenInputDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes"> <Control Id="TitleBanner" Type="Text" X="0" Y="0" Width="370" Height="44" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}Token Registration - [ProductName]" /> <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" Text="MyBannerBitmap" /> <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="1" /> <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="{\WixUI_Font_Title}Token Registration" /> <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="30" NoPrefix="yes" Text="Please enter your activation token to continue installation:" /> <Control Id="TokenLabel" Type="Text" X="20" Y="70" Width="100" Height="15" Text="Token:" /> <Control Id="TokenEdit" Type="Edit" X="20" Y="85" Width="200" Height="18" Property="TOKEN" /> <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="&Back" /> <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="&Next" /> <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="Cancel" /> </Dialog> <Dialog Id="UserInstallDirDlg" Width="370" Height="270" Title="!(loc.InstallDirDlgTitle)"> <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUINext)" /> <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)" /> <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes" Text="!(loc.WixUICancel)" /> <Control Id="Description" Type="Text" X="25" Y="23" Width="280" Height="15" Transparent="yes" NoPrefix="yes" Text="!(loc.InstallDirDlgDescription)" /> <Control Id="Title" Type="Text" X="15" Y="6" Width="200" Height="15" Transparent="yes" NoPrefix="yes" Text="Data Folder" /> <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.InstallDirDlgBannerBitmap)" /> <Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" /> <Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" /> <Control Id="FolderLabel" Type="Text" X="20" Y="60" Width="290" Height="30" NoPrefix="yes" Text="Set as Data Folder:" /> <Control Id="Folder" Type="PathEdit" X="20" Y="100" Width="320" Height="18" Property="WIXUI_INSTALLDIR" Indirect="yes" /> <Control Id="ChangeFolder" Type="PushButton" X="20" Y="120" Width="56" Height="17" Text="!(loc.InstallDirDlgChange)" /> </Dialog> <Dialog Id="BrowseDlg1" Width="370" Height="270" Title="!(loc.BrowseDlg_Title)"> <Control Id="OK" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="OK" /> <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Text="Cancel" /> </Dialog> <!-- 完整的自定义导航流程 --> <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="LicenseAgreementDlg" Condition="1"></Publish> <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" Value="TokenInputDlg" Condition="LicenseAccepted = "1""></Publish> <Publish Dialog="LicenseAgreementDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Condition="1"></Publish> <Publish Dialog="TokenInputDlg" Control="Next" Event="NewDialog" Value="UserInstallDirDlg" Condition="TOKEN AND TOKEN <> " ""></Publish> <Publish Dialog="TokenInputDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Condition="1"></Publish> <Publish Dialog="TokenInputDlg" Control="Cancel" Event="SpawnDialog" Value="CancelDlg" Condition="1"></Publish> <Publish Dialog="UserInstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="1"></Publish> <Publish Dialog="UserInstallDirDlg" Control="Back" Event="NewDialog" Value="TokenInputDlg" Condition="1"></Publish> <Publish Dialog="UserInstallDirDlg" Control="Cancel" Event="SpawnDialog" Value="CancelDlg" Condition="1"></Publish> <Publish Dialog="UserInstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg1" Condition="1"></Publish> <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="UserInstallDirDlg" Condition="1"></Publish> <Publish Dialog="BrowseDlg1" Control="OK" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" Condition="1"></Publish> <Publish Dialog="BrowseDlg1" Control="OK" Event="EndDialog" Value="Return" Order="2" Condition="1"></Publish> <Publish Dialog="BrowseDlg1" Control="Cancel" Event="EndDialog" Value="CancelDlg" Condition="1"></Publish> <Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Condition="1"></Publish> <Publish Dialog="CancelDlg" Control="No" Event="NewDialog" Value="MaintenanceTypeDlg" Condition="1"></Publish> <Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Condition="1"></Publish> </UI> <Property Id="MSIINSTALLPERUSER" Value="1" /> <Property Id="REINSTALLMODE" Value="amus" /> <Feature Id="MainApplication" Title="Main Application" Level="1" ConfigurableDirectory="INSTALLFOLDER" Display="expand"> <ComponentGroupRef Id="ProductComponents" /> <ComponentGroupRef Id="ShortcutComponents" /> <ComponentGroupRef Id="DatabaseComponents"/> <ComponentGroupRef Id="CleanupComponents" /> <ComponentGroupRef Id="TokenComponents" /> </Feature> <PropertyRef Id="WIX_IS_NETFRAMEWORK_472_OR_LATER_INSTALLED" /> <Launch Message="This application requires .NET Framework 4.7.2 or later." Condition="Installed OR WIX_IS_NETFRAMEWORK_472_OR_LATER_INSTALLED" /> </Package> </Wix>这是我的代码,我现在点击BrowseDlg1的cancel msi执行的时候还是会报错2819
10-13
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值