WIX:生成BootStrapper 条件?

发布于 2024-09-14 03:42:24 字数 267 浏览 1 评论 0原文

我使用 WIX 构建了一个安装程序,并使用 GenerateBootstrapper 任务将其与 .NET 4.0 框架打包在一起。现在.NET 4.0无法安装在XP SP2上,但它似乎没有对此进行先决条件检查,因此其安装程序中途失败。

我想添加自己的检查,以确保安装整个包的操作系统受 .NET 4.0 框架支持。当您使用 GenerateBootstrapper 时,是否可以在引导程序中嵌入操作系统/服务包检查?如果没有,我还能怎样实现这一目标?

I've built an installer with WIX and have packaged it with the .NET 4.0 framework using the GenerateBootstrapper task. Now .NET 4.0 cannot be installed on XP SP2, but it appears to have no precondition check for this so its installer fails halfway through.

I'd like to add my own check to make sure the OS that the entire package is being installed on is supported by the .NET 4.0 framework. Is there a way to embed an OS/Service Pack check in the bootstrapper when you use GenerateBootstrapper? If not, how else can I accomplish this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不忘初心 2024-09-21 03:42:24

您可以向引导程序包定义文件添加一个条件,以便引导程序检查 Windows 版本。描述文件位于

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\
    Packages\DotNetFX40\Product.xml

64 位 Windows 系统上或位于

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\
    Packages\DotNetFX40\Product.xml

32 位 Windows 系统上。 package.xml 已经包含这样的检查,请参阅

<!--  Block install on less than Windows XP SP2 --> 
<FailIf Property="VersionNT" Compare="VersionLessThan" 
        Value="5.1.2" String="InvalidPlatformWinNT" /> 

我找不到相关文档这一行,但看起来 VersionNT 值的第三个数字是服务包级别,因此可能更改条件来检查值"5.1.3" 即可完成这项工作。

You could add a condition to the bootstrapper package definition file so that the bootstrapper will check for the Windows version. The description file is located at

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\
    Packages\DotNetFX40\Product.xml

on a 64-bit Windows system or at

C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\
    Packages\DotNetFX40\Product.xml

on a 32-bit Windows system. The package.xml already contains such a check, see the line

<!--  Block install on less than Windows XP SP2 --> 
<FailIf Property="VersionNT" Compare="VersionLessThan" 
        Value="5.1.2" String="InvalidPlatformWinNT" /> 

I couldn't find the relevant documentation, but it looks as if the third number of the VersionNT value is the service pack level, so probably changing the condition to check for a value of "5.1.3" will do the job.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文