Wix Managed bootstrapper - wix

I have some ExecPackages chained in my bundle.wxs. I have a PackageGroup section for installing .Net Framework 4.0. This has been hooked in the beginning of the chain as a PackageGroupRef.
When I double click on the bootstrapper, a .Net framework installation window pops up which installs .Net Fwk. After the installation of .Net, I would expect the bootstrapper to display the managed UI and continue with the actual installation activities.
But, the issue is that it just stops after the .Net framework installation. I have to execute the bootstrapper a second time for the UI to pop up and resume the installation. The bundle.wxs content goes like this:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="My-Installer"
Version="3.0"
Manufacturer="XXXX"
HelpUrl="XXXX"
UpdateUrl="XXXX"
UpgradeCode="XXXX">
<!--Compressed="no"-->
<!--Custom dialog is a WPF form-->
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<Payload Name='BootstrapperCore.config' SourceFile='..\MyBootstrapperCustomUI\MyBootstrapperCustomUI\MyBootstrapperCustomUI.BootstrapperCore.config' />
<Payload SourceFile='..\MyBootstrapperCustomUI\MyBootstrapperCustomUI\bin\$(var.Configuration)\MyBootstrapperCustomUI.dll' />
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id='Netfx4Full' />
<ExePackage Id="MyPackage1"..../>
<ExePackage Id="MyPackage2"..../>
</Chain>
<Fragment>
<WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" />
<util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v3.5" Value="Version" Variable="Netfx35Version"/>
<PackageGroup Id="Netfx4Full">
<ExePackage Id="Netfx35" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" SourceFile="..\MyApp\dotNETFramework3.5SP1\dotnetfx35.exe" Name="MyApp\dotNETFramework3.5SP1\dotnetfx35.exe" DetectCondition="Netfx35Version AND (Netfx35Version >= v3.5.30729.1)" InstallCommand="/q /norestart" UninstallCommand="/q /norestart"
InstallCondition="(NOT Netfx35Version OR (Netfx35Version < v3.5.30729.1)) AND NOT VersionNT >= v6.0"/><!--donot install if win7-->
<ExePackage Id="Netfx4Full" Cache="no" Compressed="no" PerMachine="yes" Permanent="yes" Vital="yes" SourceFile="..\MyApp\dotNETFramework4.0\dotNetFx40_Full_x86_x64.exe" Name="MyApp\dotNETFramework4.0\dotNetFx40_Full_x86_x64.exe" InstallCommand="/passive /norestart" DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" />
</PackageGroup>
</Fragment>
</Wix>
</Bundle>

Related

Wix toolset. Cannot remove app. When I run uninstall, started install

When I want to uninstall the app, but show the install view.
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="NAME" Version="1.1.25.2" Manufacturer="NAME" UpgradeCode="ID">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes" SuppressRepair="yes" LicenseUrl="" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage Id="iis" SourceFile="$(TargetPath)" DisplayInternalUI="no" Permanent="yes"/>
<!--<ExePackage Id="hosting" SourceFile="dotnet-hosting-6.0.4-win.exe" DownloadUrl="https://download.visualstudio.microsoft.com/download/pr/0c2039d2-0072-43a8-bb20-766b9a91d001/0e2288a2f07743e63778416b2367bb88/dotnet-hosting-6.0.4-win.exe" InstallCommand="/install /quiet" Compressed="no" Permanent="yes"/>-->
<MsiPackage Id="rewrite" SourceFile="rewrite_amd64_en-US.msi" DownloadUrl="https://download.microsoft.com/download/1/2/8/128E2E22-C1B9-44A4-BE2A-5859ED1D4592/rewrite_amd64_en-US.msi" Permanent="yes" DisplayInternalUI="no"/>
<MsiPackage Id="server" SourceFile="$(TargetPath)" DisplayInternalUI="yes" Vital="yes"/>
</Chain>
</Bundle>
</Wix>

WIX; How can I pass the [installfolder] as argument in an ExePackage

I am creating a WIX bundle which calls an executable.
In that call I'm trying to pass the installfolder as an argument but for some reason this doesn't seem to work.
The bundle:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="$(var.Department) $(var.ProductName)"
Version="!(bind.packageVersion.Database.CLI.Verify)"
Manufacturer="$(var.Company) $(var.Department)"
UpgradeCode="5fc4dc21-0202-4e28-b8a4-b87f972ae32e"
DisableRemove="yes"
DisableModify="yes"
IconSourceFile="Database.ico">
<util:RegistrySearchRef Id='VerifyDotnetVersion' />
<Variable Name="InstallFolder" Type="string" Value="c:\$(var.Company)"/>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<!-- LicenseUrl intentionally empty. -->
<bal:WixStandardBootstrapperApplication LicenseUrl=""
LogoFile="Database.png"
SuppressOptionsUI="no"
SuppressRepair="yes"/>
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="SqlServer2019ExpressLocalDB" />
<PackageGroupRef Id="Database.CLI"/>
</Chain>
</Bundle>
<Fragment>
<util:FileSearch Id='VerifyDotnetVersion'
Variable="DotnetVersion"
Path="dotnet.exe"
Result="version" />
<bal:Condition Message="This installer requires at least dotnet version 6.">
DotnetVersion >= v6
</bal:Condition>
</Fragment>
</Wix>
And the part that is calling the ExePackage:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Fragment>
<PackageGroup Id="Database.CLI">
<ExePackage Id="Database.CLI.Verify"
DisplayName="Check whether SqlLocalDb has been installed."
SourceFile="$(var.SourceFile)"
InstallCommand="verify"
UninstallCommand="remove"
Vital="yes"
Compressed="no"
PerMachine="yes"
Permanent="no">
<ExitCode Value="0" Behavior="success" />
<ExitCode Value="1" Behavior="error" />
<ExitCode Value="5" Behavior="error" />
<ExitCode Value="31" Behavior="error" />
<ExitCode Value="183" Behavior="success" />
<ExitCode Value="574" Behavior="error" />
<ExitCode Value="3010" Behavior="forceReboot" />
</ExePackage>
<ExePackage Id="Database.CLI.Attach"
DisplayName="Attach database to the SqlLocalDb instance."
SourceFile="$(var.SourceFile)"
InstallCommand="attach Target="[INSTALLFOLDER]\$(var.Department)\$(var.ProductName)""
Vital="yes"
Compressed="no"
PerMachine="yes">
<ExitCode Value="0" Behavior="success" />
<ExitCode Value="1" Behavior="error" />
<ExitCode Value="5" Behavior="error" />
<ExitCode Value="31" Behavior="error" />
<ExitCode Value="183" Behavior="success" />
<ExitCode Value="574" Behavior="error" />
<ExitCode Value="3010" Behavior="forceReboot" />
</ExePackage>
</PackageGroup>
</Fragment>
</Wix>
When I look in the logs I see as argument:
[7A60:546C][2022-06-16T16:44:15]i301: Applying execute package: Database.CLI.Attach, action: Install, path: C:\ProgramData\Package Cache\0FD93FB1FD9BBE5B46CC123351ECE9DBCEC54E9D\Database.CLI.exe, arguments: '"C:\ProgramData\Package Cache\0FD93FB1FD9BBE5B46CC123351ECE9DBCEC54E9D\Database.CLI.exe" attach Target="\Analytics\Database"'
But I'm missing the contents of the [INSTALLFOLDER] so what I expect should be something like Target="c:\temp\Analytics\Database".
What am I missing here?
p.s. Is it also possible to provide an INSTALLFOLDER when launching the setup-bundle for silent installs? Like Database.Setup.exe InstallLocation=c:\temp
Many thanks in advance.
Burn variables are case-sensitive, so use [InstallFolder], not [INSTALLFOLDER].

WIX Burn Bootstrapper, installing .net framework as payload

What I want to do:
Make a wix burn bundle bootstrapper that 1st installs the .net 4.8 framework if necessary and then after that, install our custom MSI
the custom MSI is all good and working.
I want a single file, which I understand will be 100,000 K big and we're fine with that (once you package in the .net 4.8 installer)
Then just have the bootstrapper auto unpackage and run the .net framework install if needed, but everything I've tried doesn't work. Either it wants to download it (we don't want to count on internet access), or a Open File Dialog shows wanting to get pointed to the .net framework install.
all code below:
<?xml version="1.0" encoding="UTF-8" ?>
<Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Bundle
Name="OurSoftwareName"
Version="1.0.0.0"
Manufacturer="Our Company name"
UpgradeCode="deleted guid here so no one accidentally uses it">
<BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense" />
<!--
<PayloadGroup Id="NetFx48RedistPayload">
<Payload Name="redist\ndp48-x86-x64-allos-enu.exe"
SourceFile=".\Files\ndp48-x86-x64-allos-enu.exe"/>
</PayloadGroup>
-->
<Chain>
<PackageGroupRef
Id="NetFx48RedistPayload" />
<MsiPackage
After="NetFx48Redist"
SourceFile="$(var.ReferenceToOurMsi.Setup.TargetPath)" />
</Chain>
</Bundle>
</Wix>
And I've copied and altered the .net 4.8 version of wix code from and made some customizations:
https://github.com/wixtoolset/wix3/blob/develop/src/ext/NetFxExtension/wixlib/NetFx48.wxs
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
<!--
copied from:
https://github.com/wixtoolset/wix3/blob/develop/src/ext/NetFxExtension/wixlib/NetFx48.wxs
-->
<Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!--
.NET Framework installation state properties
Official documentation can be found at the following location:
.NET Framework 4.5.x/4.6.x/4.7.x/4.8.x - http://msdn.microsoft.com/en-us/library/w0x726c2(v=vs.110).aspx
-->
<?define NetFx48MinRelease = 528040 ?>
<?define NetFx48WebLink = https://go.microsoft.com/fwlink/?LinkId=2085155 ?>
<?define NetFx48RedistLink = https://go.microsoft.com/fwlink/?LinkId=2088631 ?>
<?define NetFx48EulaLink = https://referencesource.microsoft.com/license.html ?>
<Fragment>
<PropertyRef
Id="WIXNETFX4RELEASEINSTALLED" />
<Property
Id="WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED"
Secure="yes" />
<SetProperty
Id="WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED"
Value="1"
After="AppSearch">
WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx48MinRelease)"
</SetProperty>
</Fragment>
<Fragment>
<util:RegistrySearchRef
Id="NETFRAMEWORK45" />
<WixVariable
Id="WixMbaPrereqPackageId"
Value="NetFx48Web" />
<WixVariable
Id="WixMbaPrereqLicenseUrl"
Value="$(var.NetFx48EulaLink)"
Overridable="yes" />
<WixVariable
Id="NetFx48WebDetectCondition"
Value="NETFRAMEWORK45 >= $(var.NetFx48MinRelease)"
Overridable="yes" />
<WixVariable
Id="NetFx48WebInstallCondition"
Value=""
Overridable="yes" />
<WixVariable
Id="NetFx48WebPackageDirectory"
Value="redist\"
Overridable="yes" />
<PackageGroup
Id="NetFx48Web">
<ExePackage
InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html""
RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html""
UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48WebLog].html""
PerMachine="yes"
DetectCondition="!(wix.NetFx48WebDetectCondition)"
InstallCondition="!(wix.NetFx48WebInstallCondition)"
Id="NetFx48Web"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
DownloadUrl="$(var.NetFx48WebLink)"
LogPathVariable="NetFx48WebLog"
Compressed="no"
Name="!(wix.NetFx48WebPackageDirectory)ndp48-web.exe">
<RemotePayload
CertificatePublicKey="F49F9B33E25E33CCA0BFB15A62B7C29FFAB3880B"
CertificateThumbprint="ABDCA79AF9DD48A0EA702AD45260B3C03093FB4B"
Description="Microsoft .NET Framework 4.8 Setup"
Hash="4181398AA1FD5190155AC3A388434E5F7EA0B667"
ProductName="Microsoft .NET Framework 4.8"
Size="1439328"
Version="4.8.4115.0" />
</ExePackage>
</PackageGroup>
</Fragment>
<Fragment>
<util:RegistrySearchRef
Id="NETFRAMEWORK45" />
<WixVariable
Id="WixMbaPrereqPackageId"
Value="NetFx48Redist" />
<WixVariable
Id="WixMbaPrereqLicenseUrl"
Value="$(var.NetFx48EulaLink)"
Overridable="yes" />
<WixVariable
Id="NetFx48RedistDetectCondition"
Value="NETFRAMEWORK45 >= $(var.NetFx48MinRelease)"
Overridable="yes" />
<WixVariable
Id="NetFx48RedistInstallCondition"
Value=""
Overridable="yes" />
<WixVariable
Id="NetFx48RedistPackageDirectory"
Value="redist\"
Overridable="yes" />
<PackageGroup
Id="NetFx48Redist">
<ExePackage
InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
PerMachine="yes"
DetectCondition="!(wix.NetFx48RedistDetectCondition)"
InstallCondition="!(wix.NetFx48RedistInstallCondition)"
Id="NetFx48Redist"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
DownloadUrl="$(var.NetFx48RedistLink)"
LogPathVariable="NetFx48RedistLog"
Compressed="no"
Name="!(wix.NetFx48RedistPackageDirectory)ndp48-x86-x64-allos-enu.exe">
<RemotePayload
CertificatePublicKey="F49F9B33E25E33CCA0BFB15A62B7C29FFAB3880B"
CertificateThumbprint="ABDCA79AF9DD48A0EA702AD45260B3C03093FB4B"
Description="Microsoft .NET Framework 4.8 Setup"
Hash="E322E2E0FB4C86172C38A97DC6C71982134F0570"
ProductName="Microsoft .NET Framework 4.8"
Size="117380440"
Version="4.8.4115.0" />
</ExePackage>
</PackageGroup>
</Fragment>
<Fragment>
<util:RegistrySearchRef
Id="NETFRAMEWORK45" />
<WixVariable
Id="WixMbaPrereqPackageId"
Value="NetFx48Redist" />
<WixVariable
Id="WixMbaPrereqLicenseUrl"
Value="$(var.NetFx48EulaLink)"
Overridable="yes" />
<WixVariable
Id="NetFx48RedistDetectCondition"
Value="NETFRAMEWORK45 >= $(var.NetFx48MinRelease)"
Overridable="yes" />
<WixVariable
Id="NetFx48RedistInstallCondition"
Value=""
Overridable="yes" />
<WixVariable
Id="NetFx48RedistPackageDirectory"
Value="redist\"
Overridable="yes" />
<PackageGroup
Id="NetFx48RedistPayload">
<ExePackage
InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
PerMachine="yes"
DetectCondition="!(wix.NetFx48RedistDetectCondition)"
InstallCondition="!(wix.NetFx48RedistInstallCondition)"
Id="NetFx48Redist"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
LogPathVariable="NetFx48RedistLog"
Compressed="no"
SourceFile=".\Files\ndp48-x86-x64-allos-enu.exe">
<Payload Name="ndp48-x86-x64-allos-enu.exe"
SourceFile=".\Files\ndp48-x86-x64-allos-enu.exe"/>
</ExePackage>
</PackageGroup>
</Fragment>
</Wix>
I never found this this on any google hunts, but apparently setting the compressed to "yes" was the key, and no need for a payload when doing that. Worked exactly as I want at this point. Single (large) file and auto-extracts and runs.
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
<!--
copied from:
https://github.com/wixtoolset/wix3/blob/develop/src/ext/NetFxExtension/wixlib/NetFx48.wxs
-->
<Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<!--
.NET Framework installation state properties
Official documentation can be found at the following location:
.NET Framework 4.5.x/4.6.x/4.7.x/4.8.x - http://msdn.microsoft.com/en-us/library/w0x726c2(v=vs.110).aspx
-->
<?define NetFx48MinRelease = 528040 ?>
<?define NetFx48WebLink = https://go.microsoft.com/fwlink/?LinkId=2085155 ?>
<?define NetFx48RedistLink = https://go.microsoft.com/fwlink/?LinkId=2088631 ?>
<?define NetFx48EulaLink = https://referencesource.microsoft.com/license.html ?>
<Fragment>
<PropertyRef
Id="WIXNETFX4RELEASEINSTALLED" />
<Property
Id="WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED"
Secure="yes" />
<SetProperty
Id="WIX_IS_NETFRAMEWORK_48_OR_LATER_INSTALLED"
Value="1"
After="AppSearch">
WIXNETFX4RELEASEINSTALLED >= "#$(var.NetFx48MinRelease)"
</SetProperty>
</Fragment>
<!-- removed other fragments because they didn't matter -->
<Fragment>
<util:RegistrySearchRef
Id="NETFRAMEWORK45" />
<WixVariable
Id="WixMbaPrereqPackageId"
Value="NetFx48Redist" />
<WixVariable
Id="WixMbaPrereqLicenseUrl"
Value="$(var.NetFx48EulaLink)"
Overridable="yes" />
<WixVariable
Id="NetFx48RedistDetectCondition"
Value="NETFRAMEWORK45 >= $(var.NetFx48MinRelease)"
Overridable="yes" />
<WixVariable
Id="NetFx48RedistInstallCondition"
Value=""
Overridable="yes" />
<WixVariable
Id="NetFx48RedistPackageDirectory"
Value="redist\"
Overridable="yes" />
<PackageGroup
Id="NetFx48RedistPayload">
<ExePackage
InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx48RedistLog].html""
PerMachine="yes"
DetectCondition="!(wix.NetFx48RedistDetectCondition)"
InstallCondition="!(wix.NetFx48RedistInstallCondition)"
Id="NetFx48Redist"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
LogPathVariable="NetFx48RedistLog"
Compressed="yes"
SourceFile=".\Files\ndp48-x86-x64-allos-enu.exe" />
</PackageGroup>
</Fragment>
</Wix>

WiX Uninstall functionality with StandardBootstrapperApplication

I've built a very basic installer for a bundle of applications with dependencies and that handles a restart for a .NET package. What I'm running into now, however, is the problem where the uninstall action only uninstalls the installer itself, which shows up in the program list. All of the other .exe files that run installation processes remain installed. Is there any simple way to handle this installation? I'm still very new to the WiX toolset and didn't want to dive really deep into a custom installer. Here is my bundle:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="Visible EP Installer" Version="1.0.0.0" Manufacturer="VEP" UpgradeCode="8d1a4e2a-be3f-4b51-824b-75652ae98bad">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
<bal:WixStandardBootstrapperApplication
LicenseFile="..\VisibleEP EULA-ver2.rtf"
LogoFile="..\VEPLogo_HeartOnlyBlack(50x50).png"
/>
</BootstrapperApplicationRef>
<?define NetFx45MinRelease = 378389?>
<util:RegistrySearch
Id="NETFRAMEWORK45"
Variable="NETFRAMEWORK45"
Root="HKLM"
Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
Value="Release"
Result="value" />
<Chain>
<ExePackage Id="NetFx45Redist" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes" InstallCommand="/q /norestart" RepairCommand="/q"
SourceFile="..\VEP Deploy\Setup Files\dotNetFx45_Full_setup.exe"
DetectCondition="NETFRAMEWORK45 >= $(var.NetFx45MinRelease)"
InstallCondition="(NOT NETFRAMEWORK45 >= $(var.NetFx45MinRelease))">
<ExitCode Value="1641" Behavior="forceReboot"/>
<ExitCode Value="3010" Behavior="forceReboot"/>
<ExitCode Value="0" Behavior="success"/>
<ExitCode Behavior="error"/>
</ExePackage>
<ExePackage
SourceFile="..\VEP Deploy\Setup Files\Encoder_en.exe"
Permanent="no"
InstallCommand="/q"
RepairCommand="/q">
<ExitCode Behavior="success"/>
</ExePackage>
<ExePackage
SourceFile="..\VEP Deploy\Setup Files\vcredist_x86.exe"
Permanent="no"
InstallCommand="/q"
RepairCommand="/q">
<ExitCode Behavior="success"/>
</ExePackage>
<ExePackage
SourceFile="..\VEP Deploy\Setup Files\vcredist_x64.exe"
Permanent="no"
InstallCommand="/q"
RepairCommand="/q">
<ExitCode Behavior="success"/>
</ExePackage>
<ExePackage
SourceFile="..\VEP Deploy\Setup Files\vep_setup.exe"
Permanent="no">
<ExitCode Behavior="success"/>
</ExePackage>
</Chain>
</Bundle>
</Wix>
I know that handling the exit codes for the last few is a bit hackish but I'm not all that concerned with that at the moment so long as it isn't impacting my other problem.
You have to supply UninstallCommand attribute values so Burn knows how to uninstall the .exes.

How to determine whether dotnet and VSTORuntime is installed in WIX Bootstrapper

i made a setup file of my Add-Ins project using wix. it has some dependencies like dotNet and VSTO Runtime. so I used Wix bootstrapper to confirm that dependencies must be installed before installing the product it works too. But i need conditional installation of dependencies like if dotNet and VSTO runtime is installed then don't look for install these items. i tried the registry searches too but didn't get success, here is my bootstrapper code tell me where i need to modify my code.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="FinalSetup" Version="1.0.0.0" Manufacturer="Ramesh" UpgradeCode="5704ca64-b7bc-487b-8867-cabb51621c0e">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
<bal:WixStandardBootstrapperApplication LicenseFile="mylicense.rtf"
SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>
<Chain>
<ExePackage Id="dotNetFx40_Full_x86_x64" SourceFile="dotNetFx40_Full_x86_x64.exe" PerMachine="yes" Cache="no"
Compressed="no"
DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
Permanent="yes"
InstallCommand="/q /norestart"
DetectCondition="VSTOR40_Installed"
InstallCondition="1" />
<ExePackage Id="VSTORuntime" SourceFile="vstor_redist.exe" Permanent="yes" Vital="yes" Cache="no" Compressed="no"
DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=158917"
PerMachine="yes"
InstallCommand="/q /norestart"
DetectCondition="VSTOR40_Installed"
InstallCondition="NOT VSTOR40_Installed" />
<MsiPackage SourceFile="$(var.Setup.TargetPath)" Vital="yes" Compressed="yes" Id="WordAddIns" After="VSTORuntime"/>
</Chain>
</Bundle>
</Wix>
Another issue i have is, i attached the mylicense.rft which has some dummy contents. but setup doesn't show the license content during installation process, look at the attached snapshot
The issue was I forget to use value attribute which causes this problem. This was problem with rtf file, after changing the file it worked as expected.
Here is the working version of code.
Working version is here
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="FinalSetup" Version="1.0.0.0" Manufacturer="Ramesh" UpgradeCode="5704ca64-b7bc-487b-8867-cabb51621c0e">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
<bal:WixStandardBootstrapperApplication LicenseFile="mylicense.rtf"
SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>
<util:RegistrySearch Id="VSTORuntimeTest" Root="HKLM" Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4R\" Value="VSTORFeature_CLR40" Variable="VSTORFeature"/>
<util:RegistrySearch Id="VSTORuntimeVersionV4R" Root="HKLM" Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4R\" Value="Version" Variable="VSTORVersionV4R"/>
<util:RegistrySearch Id="VSTORuntimeVersionV4" Root="HKLM" Key="SOFTWARE\Microsoft\VSTO Runtime Setup\v4\" Value="Version" Variable="VSTORVersionV4"/>
<util:RegistrySearch Id="DotNetTest" Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Install" Variable="DotNetInstall"/>
<util:RegistrySearch Id="DotNetVersion" Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="DotNetVersion"/>
<Chain>
<ExePackage Id="dotNetFx40_Full_x86_x64" SourceFile="dotNetFx40_Full_x86_x64.exe" PerMachine="yes" Cache="no"
Compressed="no"
DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe"
Permanent="yes"
InstallCommand="/q /norestart"
DetectCondition="NOT DotNetInstall"
InstallCondition="NOT DotNetInstall OR NOT (DotNetVersion >=v4.0.30319)" />
<ExePackage Id="VSTORuntime" SourceFile="vstor_redist.exe" Permanent="yes" Vital="yes" Cache="no" Compressed="no"
DownloadUrl="http://go.microsoft.com/fwlink/?LinkId=158917"
PerMachine="yes"
InstallCommand="/q /norestart"
DetectCondition="VSTORFeature"
InstallCondition="NOT VSTORFeature OR NOT (VSTORVersionV4R >=v10.0.40303) OR NOT (VSTORVersionV4 >=v10.0.21022)" />
<MsiPackage SourceFile="$(var.Setup.TargetPath)" Vital="yes" Compressed="yes" Id="WordAddIns"/>
</Chain>
</Bundle>
</Wix>