-6ren">
gpt4 book ai didi

wix - 刻录 Bootstrap 未正确检测到Windows安装程序版本

转载 作者:行者123 更新时间:2023-12-04 13:17:13 25 4
gpt4 key购买 nike

目前,如果用户使用的是Windows XP,我具有以下片段来检查和安装Windows Installer 4.5。

<Fragment>
<Property Id="WinXPx86HasInstaller">
<![CDATA[VersionNT = 'v5.1' AND VersionMsi >= "4.5.6001.22159"]]>
</Property>

<PackageGroup Id="Windows.Installer.4.5">
<ExePackage Id="WinXp_x86"
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
InstallCommand="/norestart /passive"
SourceFile="WindowsXP-KB942288-v3-x86.exe"
DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsXP-KB942288-v3-x86.exe"
DetectCondition="WinXPx86HasInstaller"
InstallCondition="NOT WinXPx86HasInstaller">
<ExitCode Behavior="forceReboot" />
</ExePackage>
</PackageGroup>
</Fragment>

但是,这不起作用,并且即使安装了属性“WinXPx86HasInstaller”,该属性始终评估为false。

我究竟做错了什么?

最佳答案

有点烦人的是,与WiX不同,无法轻松测试Burn InstallConditions-仅在运行时在日志中打印出DetectConditions。在花了一段时间测试反向的InstallConditions作为DetectConditions [*]之后,此片段似乎对我有用:

<!-- Windows Installer 4.5 -->
<Fragment>
<PackageGroup Id="WindowsInstaller45">
<ExePackage
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="redist\WindowsXP-KB942288-v3-x86.exe"
DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsXP-KB942288-v3-x86.exe"
InstallCondition="VersionNT=v5.1 AND NOT VersionNT64 AND VersionMsi &lt; v4.5"
InstallCommand="/quiet /norestart">
<ExitCode Behavior="forceReboot"/>
</ExePackage>
<ExePackage
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="redist\WindowsServer2003-KB942288-v4-x86.exe"
DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsServer2003-KB942288-v4-x86.exe"
InstallCondition="VersionNT=v5.2 AND NOT VersionNT64 AND VersionMsi &lt; v4.5"
InstallCommand="/quiet /norestart">
<ExitCode Behavior="forceReboot"/>
</ExePackage>
<ExePackage
Cache="no"
Compressed="no"
PerMachine="yes"
Permanent="yes"
Vital="yes"
SourceFile="redist\WindowsServer2003-KB942288-v4-x64.exe"
DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsServer2003-KB942288-v4-x64.exe"
InstallCondition="VersionNT=v5.2 AND VersionNT64 AND VersionMsi &lt; v4.5"
InstallCommand="/quiet /norestart">
<ExitCode Behavior="forceReboot"/>
</ExePackage>
<MsuPackage
Cache="no"
Compressed="no"
Permanent="yes"
Vital="yes"
KB="KB942288"
SourceFile="redist\Windows6.0-KB942288-v2-x86.msu"
DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/Windows6.0-KB942288-v2-x86.msu"
InstallCondition="VersionNT=v6.0 AND NOT VersionNT64 AND VersionMsi &lt; v4.5"/>
<MsuPackage
Cache="no"
Compressed="no"
Permanent="yes"
Vital="yes"
KB="KB942288"
SourceFile="redist\Windows6.0-KB942288-v2-x64.msu"
DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/Windows6.0-KB942288-v2-x64.msu"
InstallCondition="VersionNT=v6.0 AND VersionNT64 AND VersionMsi &lt; v4.5"/>
</PackageGroup>
</Fragment>

关于wix - 刻录 Bootstrap 未正确检测到Windows安装程序版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10587824/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com