Bundling 3rd party Msi in WiX bootstrapper - wix

I am tying to include a driver MSI in my package chain, but I am not sure how to reference it.
I have the following code the MSI is in my project folder/Resources/DriverInstaller.msi
this is what I have, but I receive this error on build
Undefined preprocessor variable '$(var.InstallerBootstrapper.ProjectDir)'. InstallerBootstrapper
<?xml version="1.0" encoding="utf-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="Installer" Version="4.0.0.0" Manufacturer="Laxus Hipot" UpgradeCode="7cbb781f-c5cc-4805-b599-713357824532">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="Resources\EULA.rtf" LogoFile="Resources\Icon.png" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage Id="DriverInstaller" SourceFile="$(var.InstallerBootstrapper.ProjectDir)Resources\DriverInstaller.msi" />
<MsiPackage Id="Installer" SourceFile="$(var.InstallerSetup.TargetPath)" />
</Chain>
</Bundle>
</Wix>

Reference the relevant Project "InstallerBootstrapper" in the wixproj file.
For example
<ProjectReference Include="..\InstallerBootstrapper.csproj">
<Name>InstallerBootstrapper</Name>
<Project>{project guid}</Project>
</ProjectReference>

Related

Wix Bootstrapper does not display manufacturer name in Programs and Features menu

Wix bootstrapper does not show the manufacturer name in the add/remove programs menu. I am looking to replicate what the following programs have but even though my bootstrapper bundle has it's manufacturer name specified nothing displays at all where there should be a manufacturer/publisher name.
Programs and Features Screenshot
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Name="name" Version="1.0.0.0" Manufacturer="manufacturer" UpgradeCode="84884025-3ff1-4d8e-9fcc-385119a8a322">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="licence.rtf"
SuppressOptionsUI="yes"/>
</BootstrapperApplicationRef>
<Chain>
<MsiPackage Id="x64" InstallCondition="VersionNT64" SourceFile="$(var.proj.Installer.TargetDir)-Debug-x64.msi"/>
<MsiPackage Id="x86" InstallCondition="NOT VersionNT64" SourceFile="$(var.proj.Installer.TargetDir)\x86\-Debug-x86.msi"/>
</Chain>
</Bundle>
</Wix>

Wix: Creating Bootstrap .exe for .msp causes original version to uninstall

I am trying to create a Wix Bootstrap executable that contains an .msp patch file. I have generated the patch file using pyro.exe and the patch itself works absolutely fine and updates the required files correctly when ran by itself.
However we package all our .msi's in a Wix Bootstrap project with a custom user interface, which I have cloned for the patch files. However when running the executable this way it removes all the files from the install directory.
Has anyone experienced this issue before or am I doing something wrong? Thank you in advance, let me know if you need further code examples.
BootstrapBundle.wxs
<?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"
xmlns:vi="http://schemas.visualinstaller.de/VisualInstallerWixExtension">
<Bundle Name="MyProgram" Version="1.0.0.1"
Manufacturer="Test"
UpgradeCode="GUID"
SplashScreenSourceFile="Resources\splash.bmp"
IconSourceFile="Resources\icon.ico">
<Update Location="http://test.laika42.com/UpdateInfo.xml"/>
<BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'>
<PayloadGroupRef Id='VisualInstallerRuntimeFiles'/>
</BootstrapperApplicationRef>
<Variable Name="INSTALLFOLDER" bal:Overridable='yes'
Value='[ProgramFilesFolder]Test\MyProgram\'/>
<Chain>
<PackageGroupRef Id='NetFx45Web' /> <!-- Fails to build without this? -->
<MspPackage Id='PatchMsp' SourceFile='C:\Patches\Patch.msp' />
</Chain>
</Bundle>
</Wix>
Just had this problem myself. It seems that the UpgradeCode for the bundle must be different to the UpgradeCode for the MSI - the bundle will remove anything older with the same Bundle UpgradeCode, including the original full MSI. I have to say I find the Wix documentation less than illuminating. Bdum-tsh.
The important bits seem to be having different UpgradeCodes for the MSI, the MSI bootstrapper bundle and the patch bootstrapper bundle but keeping each one of the three the same going forward, and the RelatedBundle element.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<?include $(var.SolutionDir)\Installer\ProductDefs.wxi?>
<?include $(var.SolutionDir)\Installer\version.wxi?>
<!-- A DIFFERENT UpgradeCode to the main bundle, but consistent for all patches. I think. -->
<?define PatchBundleUpgradeCode = "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA"?>
<!-- The UpgradeCode of the Bundle that was used to deploy the MSI originally. -->
<?define MSIBundleUpgradeCode = "BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB"?>
<!-- ... both of which are different to the MSI UpgradeCode. -->
<Bundle Name="$(var.ProductName) $(var.ProductVersion)"
ParentName="$(var.ProductName)"
Version="$(var.ProductVersion)"
Manufacturer="$(var.Manufacturer)"
UpgradeCode="$(var.PatchBundleUpgradeCode)"
IconSourceFile="$(var.SolutionDir)\Installer\MyIcon.ico"
AboutUrl="https://www.somecompany.com/"
HelpUrl="https://www.somecompany.com/support/"
>
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="$(var.SolutionDir)\Bootstrapper\license.rtf"
LogoFile="$(var.SolutionDir)\Bootstrapper\Logo.jpg"
ShowVersion="yes"
SuppressOptionsUI="yes"
/>
</BootstrapperApplicationRef>
<OptionalUpdateRegistration Classification="Update" Name="$(var.ProductName) $(var.ProductVersion)"/>
<RelatedBundle Id="$(var.MSIBundleUpgradeCode)" Action="Patch" />
<Chain>
<MspPackage SourceFile="$(var.ProjectDir)\Release\$(var.ProductName) $(var.ProductVersion) Patch.msp" DisplayInternalUI="yes"/>
</Chain>
</Bundle>
</Wix>
Also, if you want to apply more than one minor patch, make sure your PatchMetadata element (in the patch.wxs, not the bundle.wxs) contains the following attribute otherwise the first patch will apply but subsequent ones won't.
MinorUpdateTargetRTM="1"

wix burn bundle not appearing in "add or remove programs"

I have created a bundle installer using burn, and it is working correctly, I can install and unintsall using the exe, but it isn't appearing in the control panel "add or remove programs"
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
<Bundle Version="14.0" UpgradeCode="7adb5f07-fb5f-4348-8f28-c821bebdc15e">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LogoFile="..\Installers\Graphics\banner.png"
LicenseFile="..\Installers\Text\licence.rtf"
ShowVersion="yes"
ThemeFile="ClassicTheme.xml"
LocalizationFile="ClassicTheme.wxl"
/>
</BootstrapperApplicationRef>
<Chain>
<MsiPackage DisplayName="Install My Stuff" Permanent="no" Name="My Stuff" SourceFile=".\Kits\XL\Stuff.msi"></MsiPackage>
<ExePackage DisplayName="Register Components" Permanent="no" Name="my custom stuff" SourceFile=".\Bin\RegAddIns.exe"></ExePackage>
</Chain>
</Bundle>
</Wix>
Your bundle doesn't have a name is my guess. You're missing several possible attributes in your <Bundle> tag. Usually I would include the Name, Version, Manufacturer, IconSourceFile, and UpgradeCode in the bundle definition. These are all used in the add/remove programs entry.

Wix Burn - custom template

Is there a way to change that redish CD picture in the installer?
Here's the code of the Burn project:
<?xml version="1.0" encoding="UTF-8"?>
<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="Bootstrapper" Version="1.0.0.0" Manufacturer="VilmosNagy" UpgradeCode="844c755f-f02b-4dd3-8b9c-af2498f3128c">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<MsiPackage SourceFile="..\Setup\bin\Release\Setup.msi" />
</Chain>
</Bundle>
</Wix>
Thanks!
Yes, you can use a custom theme. Here is an example from https://github.com/frederiksen/Classic-WiX-Burn-Theme:
Yes, you will want to set the LogoFile. Inside of BootstrapperApplicationRef add
<WixStandardBootstrapperApplication LogoFile="path to your logo.bmp"/>
More info on WixStandardBootstrapperApplication
To clarify Rick Bowerman's answer above, you need to use the extended XML schema in order to use WixStandardBootstrapperApplication and remove/replace the icon. Here is a more elaborate example:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
...
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.HyperlinkLicense">
<bal:WixStandardBootstrapperApplication LicenseUrl="" LogoFile="blank.png" />
</BootstrapperApplicationRef>
<Chain>
<MsiPackage SourceFile="$(var.Msi_x86)" />
<MsiPackage InstallCondition='VersionNT64' SourceFile="$(var.Msi_x64)" />
</Chain>
...
</Wix>
Note that you have to specify something for the LogoFile attribute. It cannot be empty, and leaving the attribute out will restore the horror.

Merging two msi using wix toolset

How to merge two msi using wixedit, presently they are having 4.0 version of wixtoolset. In the documentation they have mentioned that merging two msi in windows is possible using bundles and chain tags. But whenver I try to do it, it always show some error. Please let me know any example of wix tool set to merge two msi using bundle and chain tags.
I am following Bootstrapper method as provided in pdf of wix 3.6. To bundle two msi using chain element.
<?xml version="1.0" encoding="utf-8"?>
<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" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<Bundle Name="Prog" Version="0.0.0.1" Manufacturer="my Corporation" UpgradeCode="f380ae43-5df1-4cfe-9297-526e3e333e99">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication LicenseFile="..\license.rtf" />
</BootstrapperApplicationRef>
<Chain>
<!-- TODO: Define the list of chained packages. -->
<PackageGroupRef Id="Netfx45FullPackage" />
</Chain>
</Bundle>
<Fragment>
<PackageGroup Id="Netfx45FullPackage">
<MsiPackage Id="Prog" Cache="no" Compressed="no" DisplayInternalUI="yes" Vital="yes" SourceFile="$(var.installerPath)\Prog.msi" />
<MsiPackage Id="Prog2" Cache="no" Compressed="no" DisplayInternalUI="yes" Vital="yes" SourceFile="$(var.installerPath)\Prog2.msi" />
</PackageGroup>
</Fragment>
</Wix>
you can add the variable installerPath