I have an setup for my C# application. At the end of setup I added a checkbox proposing to launch application. It works good. But i'm unable to add a second checkbox proposing to launch an optional installer.
There is my code:
<?xml version="1.0" encoding="UTF-8"?>
<?define compagny = "myCompagny"?>
<?define product = "myProduct"?>
<?define version = "!(bind.FileVersion.MyProject.exe)"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Id="*"
Name="$(var.product)"
Language="1033"
Version="$(var.version)"
Manufacturer="$(var.compagny)"
UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>
<Icon Id="icone.ico" SourceFile="$(var.MyProject.ProjectDir)\Images\icone-VR.ico"/>
<Property Id="ARPPRODUCTICON" Value="icon.ico"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
<Media Id="1" Cabinet="MyProject.cab" EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="$(var.product)" Level="1">
<ComponentGroupRef Id="ProductComponents"/>
<ComponentRef Id ="ApplicationShortcut"/>
<ComponentRef Id ="ApplicationShortcutDesk"/>
</Feature>
<WixVariable Id="WixUILicenseRtf"
Value="..\license.rtf"/>
<WixVariable Id="WixUIBannerBmp"
Value=".\Resources\WixUIBannerBmp.bmp"/>
<WixVariable Id="WixUIDialogBmp"
Value=".\Resources\WixUIDialogBmp.bmp"/>
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Launch $(var.product)" />
<Property Id="WIXUI_EXITDIALOGOPTIONALTEXT" Value="Warning. If you don't have optionnal package, consider to install it."/>
<Property Id="WixShellExecTarget" Value="[#MyProject.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<UI>
<UIRef Id="WixUI_Minimal"/>
<Publish Dialog="ExitDialog"
Control="Finish"
Event="DoAction"
Value="LaunchApplication">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
</UI>
</Product>
[...]
</Wix>
How can I add another CheckBox to launch ./Resources.myOptionalPackage.exe
?
If I can't add another checkbox, can I add a new dialog page used to install the feature ?