我已经签署了设备驱动程序。Windows 10和Windows 7的签名要求不同,因此我有两套驱动程序文件。
我想使用一个单独的.wxs文件,并让安装程序根据我正在安装的Windows版本选择文件集。为了简单起见,我在Win10上使用VersionNT >= 603,在Win7上使用VersionNT < 603。我忽略了一个事实,那就是目前还没有考虑到Windows或服务器的早期版本。
我所做的是创建两个Wix <Components>,每个都有惟一的名称和GUID。在<Component>中,我有:
<!-- Pre-Win 10 -->
<difx:Driver AddRemovePrograms="no" DeleteFiles="yes" ForceInstall="no" Legacy="no" PlugAndPlayPrompt="no" />
<Condition><![CDATA[(VersionNT64 < 603)]]></Condition>
<File ....或
<!-- Win 10 -->
<difx:Driver AddRemovePrograms="no" DeleteFiles="yes" ForceInstall="no" Legacy="no" PlugAndPlayPrompt="no" />
<Condition><![CDATA[(VersionNT64 >= 603)]]></Condition>
<File ....然后,我在一个特性中包含了这两个组件的<ComponentRef>。
这将进行编译,但会为表单的每个.sys、.cat和.inf发出警告:
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包?
发布于 2017-02-21 05:17:17
由于您的创作适应了警告条件,因此您可以抑制ICE30以避免在构建过程中出现警告消息。将值为ICE30的SuppressIces属性添加到.wixproj。
https://stackoverflow.com/questions/42351569
复制相似问题