首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为Windows 10和Windows 7安装不同的文件

为Windows 10和Windows 7安装不同的文件
EN

Stack Overflow用户
提问于 2017-02-21 02:10:14
回答 1查看 607关注 0票数 3

我已经签署了设备驱动程序。Windows 10和Windows 7的签名要求不同,因此我有两套驱动程序文件。

我想使用一个单独的.wxs文件,并让安装程序根据我正在安装的Windows版本选择文件集。为了简单起见,我在Win10上使用VersionNT >= 603,在Win7上使用VersionNT < 603。我忽略了一个事实,那就是目前还没有考虑到Windows或服务器的早期版本。

我所做的是创建两个Wix <Components>,每个都有惟一的名称和GUID。在<Component>中,我有:

代码语言:javascript
复制
<!-- Pre-Win 10 -->
<difx:Driver AddRemovePrograms="no" DeleteFiles="yes" ForceInstall="no" Legacy="no" PlugAndPlayPrompt="no" /> 
<Condition><![CDATA[(VersionNT64 < 603)]]></Condition>
<File ....

代码语言:javascript
复制
<!-- Win 10 -->
<difx:Driver AddRemovePrograms="no" DeleteFiles="yes" ForceInstall="no" Legacy="no" PlugAndPlayPrompt="no" />
<Condition><![CDATA[(VersionNT64 >= 603)]]></Condition>
<File ....

然后,我在一个特性中包含了这两个组件的<ComponentRef>

这将进行编译,但会为表单的每个.sys.cat.inf发出警告:

代码语言:javascript
复制
C:\Users\me\Documents\src\Product\installer\Product.wxs(103,0): warning LGHT1076: ICE30: The target file 'driver.sys' might be installed in '[ProgramFiles64Folder]\Vendor\brbq3-yp\drivers\so-utx6z\' by two different conditionalized components on an SFN system: 'win10_driver' and 'win7_driver'. If the conditions are not mutually exclusive, this will break the component reference counting system.

在这种情况下,我知道这两个条件是相互排斥的,但我想清除警告。

有没有人能推荐一种更干净的方法来安装这些互斥的驱动程序文件集,而不需要创建两个.msi包?

EN

回答 1

Stack Overflow用户

发布于 2017-02-21 05:17:17

由于您的创作适应了警告条件,因此您可以抑制ICE30以避免在构建过程中出现警告消息。将值为ICE30SuppressIces属性添加到.wixproj。

票数 7
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42351569

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档