Unsual behaviour in WiX 3.8 bootstrapper localization - wix

I have create an installer by using WiXBaStd and customize the UI by edit the theme.xml. Besides, I have apply localization in bootstrapper and set the thm.wxl(en-us) Build Action to EmbeddedResource and thm.wxl(ja-jp) to None.
Then when I run the bootstrapper.exe in JP OS, the !(loc.ProductManufacturer) and !(loc.TransformsCode) always be EN-US but the UI display Japanese !.
If I reserve Build Action setting, set the thm.wxl(ja-jp) Build Action to EmbeddedResource and thm.wxl(en-us) to None.
Then when I run the bootstrapper.exe in JP OS, the !(loc.ProductManufacturer) and !(loc.TransformsCode) always be JA-JP ! and UI display Japanese also !.
How come the !(loc.ProductManufacturer) and !(loc.TransformsCode) not being change correctly in localization ? How to solve this problem ? Thanks.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<?define ProductName = "Product A" ?>
<?define ProductManufacturer = "!(loc.ProductManufacturer)" ?>
<?define ProductUpgradeCode = "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA" ?>
<Bundle Name="$(var.ProductName)" Version="$(var.BuildVersion)" Manufacturer="$(var.ProductManufacturer)" UpgradeCode="$(var.ProductUpgradeCode)">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes" LicenseFile="Localization\1033\LICENSE.rtf" ThemeFile="Custom\CustomRtfTheme.xml" />
<Payload Name="1033\thm.wxl" SourceFile="Localization\1033\thm.wxl" />
<Payload Name="1041\thm.wxl" SourceFile="Localization\1041\thm.wxl" />
<Payload Name="1041\LICENSE.rtf" SourceFile="Localization\1041\LICENSE.rtf" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage Id="MSI_A" SourceFile="A.msi">
<MsiProperty Name="TRANSFORMS" Value="!(loc.TransformsCode)" />
</MsiPackage>
<MsiPackage Id="MSI_B" SourceFile="B.msi">
<MsiProperty Name="TRANSFORMS" Value="!(loc.TransformsCode)" />
</MsiPackage>
</Chain>
</Bundle>
</Wix>
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="ja-jp" Language="1041" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="TransformsCode">:ja-jp.mst</String>
<String Id="ProductManufacturer">XXXXXX</String>
<String Id="Caption">[WixBundleName] Setup</String>
<String Id="Title">[WixBundleName]</String>
</WixLocalization>

Localisation strings !(loc.whatever), and !(wix.variables) are applied by the binder at the end of the overall build process, after light.exe has completed linking the compiled objects.
This statement is a pre-processor statement so the payload is not available to be resolved at the pre-compile stage:
<?define ProductManufacturer = "!(loc.ProductManufacturer)" ?>

Related

How that ININExtension.Tier*Name is being picked up in WXS file

I was trying to give a dynamic file name based on its version for WIX Component file as given below. But I would like to know how the dynamic file name will be picked up in this. Got some reference from some other WXS file but not clear how it is working. Even the file is still not working properly.
Tried this : File - icsharpcode.sharpziplibmarquee_w64.d.wxs
<?xml version='1.0' encoding='UTF-8'?>
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' xmlns:inin='http://www.inin.com/i3WixExtensions'>
<Fragment>
<DirectoryRef Id='IWP_MARQUEE'>
<Component Id='icsharpcode.sharpziplibmarquee_w64.d' Guid='YOUR-GUID' >
<File Name='icsharpcode.sharpziplib-w64r-$(ININExtension.TierVersionEicName).dll' ReadOnly='no' KeyPath='yes' Id='icsharpcode.sharpziplib-w64r.dll' Source="FindFirstInDirs(TIER_ROOT_EIC, pub/gen/bin/w64/ICSharpCode.SharpZipLib-w64r-$(ININExtension.TierVersionEicName).dll)" />
<?ifdef DebugBuild?>
<File Name='icsharpcode.sharpziplib-w64d-$(ININExtension.TierVersionEicName).dll' ReadOnly='no' Id='icsharpcode.sharpziplib-w64d.dll' Source="FindFirstInDirs(TIER_ROOT_EIC, pub/gen/bin/w64/ICSharpCode.SharpZipLib-w64d-$(ININExtension.TierVersionEicName).dll)" />
<?else ?>
<File Name='icsharpcode.sharpziplib-w64r-$(ININExtension.TierVersionEicName).pdb' ReadOnly='no' Id='icsharpcode.sharpziplib-w64r.pdb' Source="FindFirstInDirs(TIER_ROOT_EIC, pub/gen/bin/w64/ICSharpCode.SharpZipLib-w64r-$(ININExtension.TierVersionEicName).pdb)" />
<?endif ?>
</Component>
</DirectoryRef>
</Fragment>
</Wix>
Must read files like ICSharpCode.SharpZipLib-w64r-23-1.dll, ICSharpCode.SharpZipLib-w64d-23-1.dll, ICSharpCode.SharpZipLib-w64r-23-1.pdb. Where 23-1 is 2023R1 (dynamically updating based on release version)

How to Use CustomAction in Bootstrapper ExePackage DetectCondition to realize net core installed or not

I am trying to use customAction method in a Bootstrapper project to determined specific version of .net core is installed or not, but it not work
here is my wsx file code
<Fragment>
<WixVariable Id="TargetFileName" Value="[WixBundleSourceProcessPath]" Overridable="yes" />
<Binary Id="CustomAction.dll" SourceFile="$(var.CustomAction.TargetDir)CustomAction.CA.dll" />
<CustomAction Id="CheckASPNETCore" Return="check" Execute="immediate" Impersonate="no" BinaryKey=".CustomAction.dll" DllEntry="TestMethod" />
<WixVariable Id="ASPDOTNETCORE60" Value="[ASPDOTNETCORE60]" Overridable="yes" />
<PackageGroup Id="NetRuntime6Web">
<ExePackage
Name="dotnet-hosting-6.0.8-win.exe"
InstallCommand="/install /quiet /norestart /log "[AspNetCoreRuntime6Log]""
RepairCommand="/repair /quiet /norestart /log "[AspNetCoreRuntime6Log]""
UninstallCommand="/uninstall /quiet /norestart /log "[AspNetCoreRuntime6Log]""
PerMachine="yes"
DetectCondition="[ASPDOTNETCORE60] = 1"
Vital="yes"
Permanent="yes"
Protocol="burn"
DownloadUrl="https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-aspnetcore-6.0.8-windows-hosting-bundle-installer"
LogPathVariable="AspNetCoreRuntime6Log"
SourceFile="C:\Net\dotnet-hosting-6.0.8-win.exe"
Compressed="yes">
</ExePackage>
</PackageGroup>
</Fragment>
[CustomAction]
public static ActionResult TestMethod(Session session)
{
session.Log($"Test Method Run");
session["ASPDOTNETCORE60"] = "1";
return ActionResult.Success;
}
and here is my customAction
and this is the error I'm getting where run exe file
[26A0:E8C4][2022-12-01T12:17:46]e000: Error 0x8007000d: Failed to parse condition "[ASPDOTNETCORE60] = 1". Unexpected character at position 0.
how can I use that customAction ???
Each version of the .NET Runtime will create a directory in Program Files\dotnet\shared\Microsoft.NETCore.App\
The existance of the directory Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.5 confirms the existance of .NET Runtime version 6.0.5. Using this knowledge, you can do a simple DirectorySearch in Wix to check whether a specific version of the runtime is installed like so:
<!-- Check if NET 6.0 Runtime already installed -->
<util:DirectorySearch
Path="[ProgramFiles6432Folder]dotnet\shared\Microsoft.NETCore.App\6.0.5"
Result="exists"
Variable="Net6RuntimeExists"/>
Here's the (almost) full file for clarity:
<?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 ...>
... code removed for brevity
<!-- Check if NET 6.0 Runtime already installed -->
<util:DirectorySearch
Path="[ProgramFiles6432Folder]dotnet\shared\Microsoft.NETCore.App\6.0.5"
Result="exists"
Variable="Net6RuntimeExists" />
<Chain>
<!--This will only be installed when the .NET 6 Runtime is not already installed-->
<ExePackage
Id="TheNet6Runtime"
DisplayName=".NET 6 Desktop Runtime"
Vital="no"
Cache="no"
Permanent="yes"
InstallCommand="/install /quiet /norestart"
SourceFile="windowsdesktop-runtime-6.0.5-win-x64.exe"
DetectCondition="Net6RuntimeExists" />
... code removed for brevity
</Chain>
</Bundle>
</Wix>

Upgrade to a newer version using WIX Installer doesn't copy the new files

I am trying to upgrade an already installed MSI package from V1 to V2.
The MSI package is part of a bundle (we have 10 different MSI packages in the bundle, but only this one is causing upgrade issues).
The problem I have is that after upgrade the new version appears correct in Control Panel but when I go to the disk the new files are not copied and I'm left with the old files on the disk (V1 files).
If I do a Repair from Control Panel the new files get copied with the correct version.
I am using WixSharp version 1.4.4.1.
Does anyone know why the upgrade is not done properly?
An example of how the Bundle.wxs looks like can be found below:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Test.Installer"
Version="!(bind.packageVersion.Test_Package_msi)"
Manufacturer="Test"
UpgradeCode="bdbd5b31-e749-455d-9fea-cd81f3297ca1" >
<BootstrapperApplicationRef Id ="ManagedBootstrapperApplicationHost" >
<PayloadGroupRef Id ="InstallerPayload" />
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id ="NetFx472Redist" />
<PackageGroupRef Id ="InstallerPackages" />
</Chain>
</Bundle>
<?define NetFx472MinVersion = 4703062 ?>
<?define NetFx472EulaLink = https://referencesource.microsoft.com/license.html ?>
<?define NetFx472RedistLink = https://go.microsoft.com/fwlink/?linkid=863265 ?>
<Fragment>
<WixVariable Id="WixMbaPrereqPackageId" Value="NetFx472Redist" />
<WixVariable Id="WixMbaPrereqLicenseUrl" Value="$(var.NetFx472EulaLink)" Overridable="yes" />
<WixVariable Id="NetFx472RedistCondition" Value="Netfx4FullVersion >= $(var.NetFx472MinVersion)" Overridable="yes" />
<WixVariable Id="NetFx472RedistPackageDirectory" Value="Redist\NETFX472\" Overridable="yes" />
<util:RegistrySearch
Root="HKLM"
Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full"
Value="Version"
Variable="Netfx4FullVersion" />
<PackageGroup Id="NetFx472Redist">
<ExePackage
DisplayName="Microsoft .NET Framework 4.7.2"
InstallCommand="/q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx472FullLog].html""
RepairCommand="/q /norestart /repair /ChainingPackage "[WixBundleName]" /log "[NetFx472FullLog].html""
UninstallCommand="/uninstall /q /norestart /ChainingPackage "[WixBundleName]" /log "[NetFx472FullLog].html""
PerMachine="yes"
DetectCondition="!(wix.NetFx472RedistCondition)"
InstallCondition="NOT !(wix.NetFx472RedistCondition)"
DownloadUrl="$(var.NetFx472RedistLink)"
Id="NetFx472Redist"
Vital="yes"
Permanent="yes"
Protocol="netfx4"
Compressed="yes"
SourceFile="..\Redist\NETFX472\NDP472-KB4054530-x86-x64-AllOS-ENU.exe"
Name="!(wix.NetFx472RedistPackageDirectory)NDP472-KB4054530-x86-x64-AllOS-ENU.exe"
>
</ExePackage>
</PackageGroup>
</Fragment>
<Fragment>
<PayloadGroup Id ="InstallerPayload">
<Payload SourceFile = "$(var.SolutionDir)\Libraries\Microsoft.Deployment.WindowsInstaller.dll" />
<Payload SourceFile = "$(var.SolutionDir)\Libraries\GalaSoft.MvvmLight.dll"/>
<Payload SourceFile = "$(var.SolutionDir)\Libraries\GalaSoft.MvvmLight.Extras.dll"/>
<Payload SourceFile = "$(var.SolutionDir)\Libraries\GalaSoft.MvvmLight.Platform.dll"/>
<Payload SourceFile = "$(var.SolutionDir)\Libraries\log4net.dll"/>
</PayloadGroup>
</Fragment>
<Fragment>
<PackageGroup Id ="InstallerPackages">
<MsiPackage SourceFile="$(var.SolutionDir)\Libraries\MSI\Package1.msi" ForcePerMachine="yes"
Id="Package1_msi" DisplayName="Package 1" Visible="yes" Cache="yes" DisplayInternalUI="no" Description="23A29233-37FD-4079-92AF-8337998DF4D3">
</MsiPackage>
<!-- 10 other packages -->
</PackageGroup>
</Fragment>
</Wix>
The MSI project is created using the following lines:
var project = new ManagedProject();
project.Name = "Test";
project.Description = "Test Package";
project.GUID = Guid.Parse("{94682162-F133-40A3-92BB-0AF08142474C}");
project.ProductId = Guid.Parse("{94682162-F133-40A3-92BB-0AF08142474C}");
project.Dirs = GetDirectoriesAndFilesToInstall();
project.Version = GetInstallerVersion();
project.BannerImage = "Banner.bmp";
project.Actions = new WixSharp.Action[]
{
new ElevatedManagedAction(CustomActions.UninstallService, Return.check, When.After, Step.InstallInitialize, Condition.Always),
new ElevatedManagedAction(CustomActions.InstallService, Return.check, When.After, Step.InstallExecute, Condition.Always),
};
project.BuildMsi(msiPath);
I found the problem: the upgrade only works if you add files during the upgrade, not if you remove files.
I compared the old installation with the new one and 6 files were missing from the new one. Because of that the upgrade didn't update any files at all.
The article that inspired me can be found here:
MSI Installer Rules
I realized that I broke Rule 2: Only add, never remove resources from a component
This is somehow weird, what if I want to remove files during an upgrade? What solutions do I have?
UPDATE: I found out that the MajorUpgrade can be forced in code like below:
var project = new ManagedProject
{
Name = "Your name",
Description = "Your description",
GUID = Guid.Parse("{94682162-F133-40A3-92BB-0AF08142474C}"),
MajorUpgrade = new MajorUpgrade
{
DowngradeErrorMessage = $"A later version of {projectName} is already installed. Setup will now exit."
},
Actions = new WixSharp.Action[]
{
new ElevatedManagedAction(CustomActions.UninstallService, Return.check, When.After, Step.InstallInitialize, Condition.Always),
new ElevatedManagedAction(CustomActions.InstallService, Return.check, When.After, Step.InstallExecute, Condition.Always),
}
};
and you don't need to change the major part in the assembly version.
For instance, if the existing installer had version 1.1.0.0 installed, then you can force a Major Upgrade in code but change the version to 1.2.0.0 instead of changing to 2.0.0.0.
Also, in the installer bundle project I had to add this property: EnableFeatureSelection="yes" for each of the MSIPackage element. This property enables you to catch the event named: DetectRelatedMsiPackage. This will help you to differentiate between versions and identify which package is installed or not and also which one can be upgraded.

How to install multiple WebAddresses conditionally?

I have a website that I am installing for one of our internal products, and would like to know if there is a way to set up multiple <WebAddress/> blocks to be conditionally installed along with this one website?
Consider my basic website authoring below:
<Component
Id="WebsiteComp"
Directory="INSTALLDIR"
Guid="{702AF20D-F9F3-45A1-B966-890855904591}"
KeyPath="yes">
<iis:WebAppPool
Id="AppPool"
Name="OurSite"
ManagedPipelineMode="Integrated"
ManagedRuntimeVersion="v4.0"/>
<iis:WebSite
Id="Website"
Description="[WEBSITENAME]"
Directory="INSTALLDIR">
<iis:WebApplication
Id="WebApp"
Name="[WEBSITENAME]"
WebAppPool="AppPool"/>
<!-- if ENV = "DEV" -->
<iis:WebAddress
Id="DevHostHeader"
Header="dev.product.company.com"
Port="80"/>
<!-- if ENV = "QA" -->
<iis:WebAddress
Id="QaHostHeader"
Header="qa.product.company.com"
Port="80"/>
<iis:WebAddress
Id="QaHostHeader"
Header="product.qa1.company.com"
Port="80"/>
<!-- if ENV = "PROD" -->
<iis:WebAddress
Id="ProdHostHeader"
Header="prod.product.com"
Port="80"/>
</iis:WebSite>
</Component>
<Component/> is the most specific element that a condition can applied to. But in order to specify the condition there I have to duplicate all my web site auhtoring for each environment, correct?
Is there a way to author one version of the <WebAppPool/>, <WebSite/>, and <WebApplication/> and then have different versions and quantities (like QA in the above example) of <WebAddress/> inserted/chosen based on the condition of a propertie's value?
I really don't want to get into making multiple versions of the installer for a specific environment.
Thank you,
Zachary
You can approach the problem in a different way.
You can have a single WebAddress element, and the Header attribute will take the value of the property. Like this:
<iis:WebAddress Id="HostHeader" Header="[HOSTHEADER]" Port="80"/>
Now, based on the condition (production, DEV, QA) you set the property to the required value, for instance, qa.product.company.com for QA. Thus, you'll conditionally install the host header you need, and will keep a single WebAddress entry in the sources. Note, that Port attribute can accept the property values as well.
Well, I figured out how to do it without code duplication... pre-processor to the rescue!
Here's a simplified look at my "web services" directory:
ProductName.WebService.wxs
ProductName.DEV.WebAddress.wxi
ProductName.PROD.WebAddress.wx
ProductName.QA1.WebAddress.wxi
ProductName.WebService.wxs is as follows:
<Wix
xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">
<Fragment>
<iis:WebDirProperties .../>
<?foreach EnvID in DEV;PROD;QA1 ?>
<?define FullEnvID = "ProductName.$(var.EnvID)" ?>
<?if $(var.EnvID) = "DEV" ?>
<?define CompGUID = "{DFEAC94A-590E-4E92-9206-E574ABDDBB29}" ?>
<?elseif $(var.EnvID) = "PROD" ?>
<?define CompGUID = "{FEE4FBB1-9894-48F4-8DDC-9FC83F8AD778}" ?>
<?elseif $(var.EnvID) = "QA1" ?>
<?define CompGUID = "{EED17AF6-BF99-4B34-821D-6A8487292111}" ?>
<?endif ?>
<Component
Id="$(var.FullEnvID).WebSvc"
Directory="INSTALLDIR"
Guid="$(var.CompGUID)"
KeyPath="yes">
<Condition><![CDATA[ENV="$(var.EnvID)"]]></Condition>
<iis:WebAppPool
Id="$(var.FullEnvID).WebAppPool"
Name="[WEBSITENAME]"
ManagedPipelineMode="Integrated"
ManagedRuntimeVersion="v4.0"/>
<iis:WebSite
Id="$(var.FullEnvID).Website"
Description="[WEBSITENAME]"
Directory="INSTALLDIR">
<iis:WebApplication
Id="$(var.FullEnvID).WebApplication"
Name="[WEBSITENAME]"
WebAppPool="$(var.FullEnvID).WebAppPool"/>
<?include $(var.FullEnvID).WebAddress.wxi ?>
</iis:WebSite>
</Component>
<?undef CompGUID ?>
<?undef FullEnvID ?>
<?endforeach ?>
</Fragment>
</Wix>
<Condition><![CDATA[ENV="$(var.EnvID)"]]></Condition> determines which web site component is installed
<?include $(var.FullEnvID).WebAddress.wxi ?> slips in just the <iis:WebAddress/> sections as the loop iterates.
Here's what ProductName.DEV.WebAddress.wxi looks like:
<Include
xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:iis="http://schemas.microsoft.com/wix/IIsExtension">
<iis:WebAddress
Id="dev.product.company.com"
Header="dev.product.company.com"
Port="80"/>
<iis:WebAddress
Id="product.dev.company.com"
Header="product.dev.company.com"
Port="80"/>
</Include>

WiX Burn custom UI

I am trying to create a custom UI for WiX and Burn. I have followed some of the guides I've found, and so far I have a project that has the following, which inherits from BootstrapperApplication.
namespace MyBA
{
public class TestBA : BootstrapperApplication
{
protected override void Run()
{
MessageBox.Show("My BA is running");
this.Engine.Quit(0);
}
}
}
And in the AssemblyInfo.cs:
[assembly: BootstrapperApplication(typeof(TestBA))]
Then in my Bootstrapper project I have the following.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="MyApplication"
Version="1.0.0"
Manufacturer="Acme Ltd"
UpgradeCode="F84A4058-FDF6-4218-BCB5-12C811DA3C99"
Condition="NOT ((VersionNT = 600 AND ServicePackLevel >=2) OR (VersionNT >= 601))"
IconSourceFile="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)logo.ico"
SplashScreenSourceFile="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Splashscreen.bmp"
DisableRepair="no"
DisableRemove="no"
DisableModify="no">
<WixVariable Id="WixMbaPrereqPackageId"
Value="Netfx4Full" />
<WixVariable Id="WixMbaPrereqLicenseUrl"
Value="NetfxLicense.rtf" />
<WixVariable Id="WixStdbaLicenseRtf"
Value="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Licence.en-gb.rtf" />
<WixVariable Id="WixStdbaLogo"
Value="$(var.MyApplicationInstallerRequiredFiles.ProjectDir)logoInstallSmall.bmp" />
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<Payload Name='BootstrapperCore.config'
SourceFile='$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Bootstrapper\MyBA.BootstrapperCore.config' />
<Payload SourceFile='$(var.MyApplicationInstallerRequiredFiles.ProjectDir)Bootstrapper\MyBA.dll' />
</BootstrapperApplicationRef>
<Chain>
<PackageGroupRef Id="MyApplicationPackage" />
</Chain>
</Bundle>
</Wix>
and I have added MyBA.BootstrapperCore.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="wix.bootstrapper"
type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore">
<section name="host"
type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" />
</sectionGroup>
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
</startup>
<wix.bootstrapper>
<host assemblyName="MyBA">
<supportedFramework version="v4\Full" />
<supportedFramework version="v4\Client" />
</host>
</wix.bootstrapper>
</configuration>
However, whenever I run the Setup.exe for the bootstrapper, I get the splashscreen appear briefly, but nothing else. If I look in the %TEMP% at the logs there is the following
[0A00:0424][2011-11-02T15:52:08]: Burn v3.6.2221.0, path: C:\MyApplication\dev\source\Bootstrapper1\bin\Debug\Setup.exe, cmdline: ''
[0A00:0424][2011-11-02T15:52:08]: Setting string variable 'WixBundleName' to value 'MyApplication'
[0A00:0424][2011-11-02T15:52:08]: Setting string variable 'WixBundleLog' to value 'C:\Users\AppData\Local\Temp\MyApplication_20111102155208.log'
[0A00:0424][2011-11-02T15:52:08]: Condition 'NOT ((VersionNT = 600 AND ServicePackLevel >=2) OR (VersionNT >= 601))' evaluates to true.
[0A00:0424][2011-11-02T15:52:08]: Setting string variable 'WixBundleOriginalSource' to value 'C:\MyApplication\dev\source\Bootstrapper1\bin\Debug\Setup.exe'
[0A00:0424][2011-11-02T15:52:08]: Loading managed bootstrapper application.
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed to create the managed bootstrapper application.
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed to create UX.
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed to load UX.
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed while running
[0A00:0424][2011-11-02T15:52:08]: Error 0x80131040: Failed to run per-user mode.
Why is this happening and why are the above errors occurring?
If you look at the source code for the WixBA, they declare a global Threading.Dispatcher, and then in the overridden Run() method, there is the following line:
Threading.Dispatcher.Run();
I had similar issues, and similarly adding the Threading.Dispatcher to my bootstrapper application fixed them.
Also, if your Bootstrapper Application depends on any other dlls, you need to include them as a <Payload/> under your <BootstrapperApplicationRef/>.