Skip to content

Instantly share code, notes, and snippets.

@nathancorvussolis
Last active November 30, 2021 11:55
Show Gist options
  • Save nathancorvussolis/745631b08e5b511d689be46756652fa6 to your computer and use it in GitHub Desktop.
Save nathancorvussolis/745631b08e5b511d689be46756652fa6 to your computer and use it in GitHub Desktop.
<?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="Example Product"
Version="1.2.3.4"
Manufacturer="John Doe"
Copyright="© 2021 John Doe"
AboutUrl="https://example.com/"
UpgradeCode="01234567-89AB-CDEF-0123-456789ABCDEF"
Condition="VersionNT >= v6.0">
<BootstrapperApplicationRef
Id="WixStandardBootstrapperApplication.RtfLicense">
<bal:WixStandardBootstrapperApplication
LicenseFile="license.rtf"
ShowVersion="yes"
SuppressOptionsUI="yes" />
</BootstrapperApplicationRef>
<!-- v6.0 Service Pack 2 -->
<bal:Condition Message="This application requires Service Pack 2 for Windows Vista / Server 2008.">
<![CDATA[NOT ((VersionNT = v6.0) AND (ServicePackLevel < 2))]]>
</bal:Condition>
<!-- v6.1 Service Pack 1 -->
<bal:Condition Message="This application requires Service Pack 1 for Windows 7 / Server 2008 R2.">
<![CDATA[NOT ((VersionNT = v6.1) AND (ServicePackLevel < 1))]]>
</bal:Condition>
<!-- v6.3 KB2919355 -->
<util:FileSearch
Id="HAL.DLL"
Path="[WindowsFolder]System32\hal.dll"
Result="version"
Variable="NT603HALVER"
Condition="VersionNT = v6.3" />
<bal:Condition Message="This application requires S14 Update (KB2919355) for Windows 8.1 / Server 2012 R2.">
<![CDATA[NOT ((VersionNT = v6.3) AND (NT603HALVER < v6.3.9600.17031))]]>
</bal:Condition>
<!-- ucrtbase.dll version -->
<util:FileSearch
Id="UCRTBASE.DLL"
Path="[WindowsFolder]System32\ucrtbase.dll"
Result="version"
Variable="UCRTBASEVER" />
<!-- universal crt version -->
<Variable
Name="UCRTVER"
Type="version"
Value="10.0.10586.0" />
<Chain>
<!-- Windows Vista / Windows Server 2008 (x86) -->
<MsuPackage
Name="Windows6.0-KB3118401-x86.msu"
DisplayName="Universal CRT"
KB="KB3118401"
Cache="no"
Compressed="yes"
Permanent="yes"
SourceFile="Windows6.0-KB3118401-x86.msu"
InstallCondition="(VersionNT = v6.0) AND NOT (VersionNT64)"
DetectCondition="(VersionNT = v6.0) AND NOT (VersionNT64) AND (UCRTBASEVER >= UCRTVER)" />
<!-- Windows Vista / Windows Server 2008 (x64) -->
<MsuPackage
Name="Windows6.0-KB3118401-x64.msu"
DisplayName="Universal CRT"
KB="KB3118401"
Cache="no"
Compressed="yes"
Permanent="yes"
SourceFile="Windows6.0-KB3118401-x64.msu"
InstallCondition="(VersionNT = v6.0) AND (VersionNT64)"
DetectCondition="(VersionNT = v6.0) AND (VersionNT64) AND (UCRTBASEVER >= UCRTVER)" />
<!-- Windows 7 (x86) -->
<MsuPackage
Name="Windows6.1-KB3118401-x86.msu"
DisplayName="Universal CRT"
KB="KB3118401"
Cache="no"
Compressed="yes"
Permanent="yes"
SourceFile="Windows6.1-KB3118401-x86.msu"
InstallCondition="(VersionNT = v6.1) AND NOT (VersionNT64)"
DetectCondition="(VersionNT = v6.1) AND NOT (VersionNT64) AND (UCRTBASEVER >= UCRTVER)" />
<!-- Windows 7 / Windows Server 2008 R2 (x64) -->
<MsuPackage
Name="Windows6.1-KB3118401-x64.msu"
DisplayName="Universal CRT"
KB="KB3118401"
Cache="no"
Compressed="yes"
Permanent="yes"
SourceFile="Windows6.1-KB3118401-x64.msu"
InstallCondition="(VersionNT = v6.1) AND (VersionNT64)"
DetectCondition="(VersionNT = v6.1) AND (VersionNT64) AND (UCRTBASEVER >= UCRTVER)" />
<!-- Windows 8 (x86) -->
<MsuPackage
Name="Windows8-RT-KB3118401-x86.msu"
DisplayName="Universal CRT"
KB="KB3118401"
Cache="no"
Compressed="yes"
Permanent="yes"
SourceFile="Windows8-RT-KB3118401-x86.msu"
InstallCondition="(VersionNT = v6.2) AND NOT (VersionNT64)"
DetectCondition="(VersionNT = v6.2) AND NOT (VersionNT64) AND (UCRTBASEVER >= UCRTVER)" />
<!-- Windows 8 / Windows Server 2012 (x64) -->
<MsuPackage
Name="Windows8-RT-KB3118401-x64.msu"
DisplayName="Universal CRT"
KB="KB3118401"
Cache="no"
Compressed="yes"
Permanent="yes"
SourceFile="Windows8-RT-KB3118401-x64.msu"
InstallCondition="(VersionNT = v6.2) AND (VersionNT64)"
DetectCondition="(VersionNT = v6.2) AND (VersionNT64) AND (UCRTBASEVER >= UCRTVER)" />
<!-- Windows 8.1 (x86) -->
<MsuPackage
Name="Windows8.1-KB3118401-x86.msu"
DisplayName="Universal CRT"
KB="KB3118401"
Cache="no"
Compressed="yes"
Permanent="yes"
SourceFile="Windows8.1-KB3118401-x86.msu"
InstallCondition="(VersionNT = v6.3) AND NOT (VersionNT64)"
DetectCondition="(VersionNT = v6.3) AND NOT (VersionNT64) AND (UCRTBASEVER >= UCRTVER)" />
<!-- Windows 8.1 / Windows Server 2012 R2 (x64) -->
<MsuPackage
Name="Windows8.1-KB3118401-x64.msu"
DisplayName="Universal CRT"
KB="KB3118401"
Cache="no"
Compressed="yes"
Permanent="yes"
SourceFile="Windows8.1-KB3118401-x64.msu"
InstallCondition="(VersionNT = v6.3) AND (VersionNT64)"
DetectCondition="(VersionNT = v6.3) AND (VersionNT64) AND (UCRTBASEVER >= UCRTVER)" />
</Chain>
</Bundle>
</Wix>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment