Kev*_*evM 5 windows-installer wix
我有一个长期存在的安装程序,它使用RegistryValue来设置.Net COM服务器.安装程序是32位.我想为64位操作系统设置注册表设置.我的研究表明,为此,我需要一个单独的64位安装程序.那么我怎么能有一个检测OS的引导程序并调用正确的32位或64位.msi?
小智 10
我在自定义Windows Shell Overlay Extension中遇到了同样的问题,它必须为32位Windows提供32位Dll,为64位Windows提供64位Dll.我的32位msi文件只会将注册表项写入64位系统上的WoW6432节点,因此shell扩展不起作用.
解决方案(在Win7 x86和x64上使用wix-3.5.2519.0进行测试):
例:
<Component Id="shellext_32.dll" DiskId="1" Guid="YOUR-GUID1">
<!-- this will be installed only on a 32-bit System-->
<Condition><![CDATA[NOT Msix64]]></Condition>
<!-- copy 32-bit Dll file...-->
<File Id="blah blah... />
<RegistryKey Id="MyShellIconOverlay" Root="HKLM"Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\MyIconOverlay" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="{GUID...}" />
</RegistryKey>
</Component>
<Component Id="shellext_64.dll" DiskId="1" Guid="YOUR-GUID2" Win64="yes">
<!-- this will be installed only on a 64-bit System-->
<Condition><![CDATA[Msix64]]></Condition>
<!-- copy 64-bit Dll file...-->
<File Id="blah blah... />
<!-- the following Registry Key will NOT be created inside the WoW6432
<RegistryKey Id="MyShellIconOverlay64" Root="HKLM" Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers\MyIconOverlay64" Action="createAndRemoveOnUninstall">
<RegistryValue Type="string" Value="{GUID...}" />
</RegistryKey>
</Component>
Run Code Online (Sandbox Code Playgroud)
参考文献:
您需要自己编写引导程序。
WiX 不支持混合 32/64 位软件包,因为 Windows Installer 不支持它们。但是,一些商业工具使用自定义引导程序和 2 个 MSI 文件来处理混合安装程序。
| 归档时间: |
|
| 查看次数: |
2294 次 |
| 最近记录: |