How to skip a bootstrapper or ignore fail in Windows 8?

南笙酒味 提交于 2019-12-24 14:32:21

问题


I have a WiX installer and a number of bootstrappers. We recently added SQL LocalDB support and found we needed to package .Net 4.0.2 to get it to work. I am now testing on Windows 8, and find that this patch fails and isn't actually needed for this OS.

However, my installer fails because .Net 4.0.2 fails. I am trying to find a way of either skipping this patch in Windows 8 or just ignoring a fail for this patch?

I have "InstallConditions" and "ExitCodes" in my package.xml, but I don't know how to change these to achieve either:

  1. don't try to install when OS is windows 8, or
  2. try, but ignore a fail and continue to the next step

Any ideas?


回答1:


I figured this out by trial and error, and I'll put the solution here for others who might find it useful. The problem was I was using ValueGreaterThanOrEqualTo and it should have been VersionGreaterThanOrEqualTo

This will skip for Windows 8

<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="6.2"/>

This will skip for Windows 7 and 8

<BypassIf Property="VersionNT" Compare="VersionGreaterThanOrEqualTo" Value="6.1"/>



来源:https://stackoverflow.com/questions/18919110/how-to-skip-a-bootstrapper-or-ignore-fail-in-windows-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!