我签了设备驱动程序.Windows 10和Windows 7的签名要求不同,因此我有两组驱动程序文件.
我想使用单个.wxs文件并让安装程序根据我正在安装的Windows版本选择文件集.为简单起见,我使用的VersionNT >= 603是Win 10和VersionNT < 603Win 7.我忽略了这样一个事实,即现在没有考虑早期版本的Windows或Server版本.
我所做的是创建两个Wix <Components>,每个Wix 都有唯一的名称和GUID.内<Component>我有:
<!-- Pre-Win 10 -->
<difx:Driver AddRemovePrograms="no" DeleteFiles="yes" ForceInstall="no" Legacy="no" PlugAndPlayPrompt="no" />
<Condition><![CDATA[(VersionNT64 < 603)]]></Condition>
<File ....
Run Code Online (Sandbox Code Playgroud)
要么
<!-- Win 10 -->
<difx:Driver AddRemovePrograms="no" DeleteFiles="yes" ForceInstall="no" Legacy="no" PlugAndPlayPrompt="no" />
<Condition><![CDATA[(VersionNT64 >= 603)]]></Condition>
<File ....
Run Code Online (Sandbox Code Playgroud)
然后我<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.
Run Code Online (Sandbox Code Playgroud)
在这种情况下,我知道这两个条件是互斥的,但我想清理警告.
任何人都可以推荐一种更简洁的方法来安装这些互斥的驱动程序文件集而无需创建两个.msi包吗
| 归档时间: |
|
| 查看次数: |
534 次 |
| 最近记录: |