wix – Burn bootstrapper未正确检测Windows安装程序版本

前端之家收集整理的这篇文章主要介绍了wix – Burn bootstrapper未正确检测Windows安装程序版本前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
目前,如果用户Windows XP上,我有以下片段来检查和安装Windows Installer 4.5.
  1. <Fragment>
  2. <Property Id="WinXPx86HasInstaller">
  3. <![CDATA[VersionNT = 'v5.1' AND VersionMsi >= "4.5.6001.22159"]]>
  4. </Property>
  5.  
  6. <PackageGroup Id="Windows.Installer.4.5">
  7. <ExePackage Id="WinXp_x86"
  8. Cache="no"
  9. Compressed="no"
  10. PerMachine="yes"
  11. Permanent="yes"
  12. Vital="yes"
  13. InstallCommand="/norestart /passive"
  14. SourceFile="WindowsXP-KB942288-v3-x86.exe"
  15. DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsXP-KB942288-v3-x86.exe"
  16. DetectCondition="WinXPx86HasInstaller"
  17. InstallCondition="NOT WinXPx86HasInstaller">
  18. <ExitCode Behavior="forceReboot" />
  19. </ExePackage>
  20. </PackageGroup>
  21. </Fragment>

但是,这不起作用,即使安装它,属性“WinXPx86HasInstaller”也总是计算为false.

我究竟做错了什么?

有点烦人的是,与WiX不同,没有办法轻松测试Burn InstallConditions – 只有DetectConditions在运行时打印在日志中.花了一段时间测试反向InstallConditions作为DetectConditions [*],这个片段似乎适合我:
  1. <!-- Windows Installer 4.5 -->
  2. <Fragment>
  3. <PackageGroup Id="WindowsInstaller45">
  4. <ExePackage
  5. Cache="no"
  6. Compressed="no"
  7. PerMachine="yes"
  8. Permanent="yes"
  9. Vital="yes"
  10. SourceFile="redist\WindowsXP-KB942288-v3-x86.exe"
  11. DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsXP-KB942288-v3-x86.exe"
  12. InstallCondition="VersionNT=v5.1 AND NOT VersionNT64 AND VersionMsi &lt; v4.5"
  13. InstallCommand="/quiet /norestart">
  14. <ExitCode Behavior="forceReboot"/>
  15. </ExePackage>
  16. <ExePackage
  17. Cache="no"
  18. Compressed="no"
  19. PerMachine="yes"
  20. Permanent="yes"
  21. Vital="yes"
  22. SourceFile="redist\WindowsServer2003-KB942288-v4-x86.exe"
  23. DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsServer2003-KB942288-v4-x86.exe"
  24. InstallCondition="VersionNT=v5.2 AND NOT VersionNT64 AND VersionMsi &lt; v4.5"
  25. InstallCommand="/quiet /norestart">
  26. <ExitCode Behavior="forceReboot"/>
  27. </ExePackage>
  28. <ExePackage
  29. Cache="no"
  30. Compressed="no"
  31. PerMachine="yes"
  32. Permanent="yes"
  33. Vital="yes"
  34. SourceFile="redist\WindowsServer2003-KB942288-v4-x64.exe"
  35. DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/WindowsServer2003-KB942288-v4-x64.exe"
  36. InstallCondition="VersionNT=v5.2 AND VersionNT64 AND VersionMsi &lt; v4.5"
  37. InstallCommand="/quiet /norestart">
  38. <ExitCode Behavior="forceReboot"/>
  39. </ExePackage>
  40. <MsuPackage
  41. Cache="no"
  42. Compressed="no"
  43. Permanent="yes"
  44. Vital="yes"
  45. KB="KB942288"
  46. SourceFile="redist\Windows6.0-KB942288-v2-x86.msu"
  47. DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/Windows6.0-KB942288-v2-x86.msu"
  48. InstallCondition="VersionNT=v6.0 AND NOT VersionNT64 AND VersionMsi &lt; v4.5"/>
  49. <MsuPackage
  50. Cache="no"
  51. Compressed="no"
  52. Permanent="yes"
  53. Vital="yes"
  54. KB="KB942288"
  55. SourceFile="redist\Windows6.0-KB942288-v2-x64.msu"
  56. DownloadUrl="http://download.microsoft.com/download/2/6/1/261fca42-22c0-4f91-9451-0e0f2e08356d/Windows6.0-KB942288-v2-x64.msu"
  57. InstallCondition="VersionNT=v6.0 AND VersionNT64 AND VersionMsi &lt; v4.5"/>
  58. </PackageGroup>
  59. </Fragment>

猜你在找的Windows相关文章