そこで、ucrtbase.dllファイルのチェックをSystem32ディレクトリに限定し、MsuPackage要素にDetectCondition属性を使ってみました。
<?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="© 2016 John Doe" AboutUrl="https://example.com/"
UpgradeCode="01234567-89AB-CDEF-0123-456789ABCDEF" Condition="VersionNT >= v5.1">
<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.">
(VersionNT <> v6.0) OR (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.">
(VersionNT <> v6.1) OR (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.">
(VersionNT <> v6.3) OR (VersionNT = v6.3 AND NT603HALVER > v6.3.9600.16500)
</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" />
<!-- x64 modules -->
<MsiPackage Id="X64" DisplayName="x64 modules" ForcePerMachine="yes" Compressed="yes"
SourceFile="x64.msi" InstallCondition="VersionNT64" />
<!-- x86 modules -->
<MsiPackage Id="X86" DisplayName="x86 modules" ForcePerMachine="yes" Compressed="yes"
SourceFile="x86.msi" After="X64" />
</Chain>
</Bundle>
</Wix>
ちょっとすっきり。
0 件のコメント:
コメントを投稿