为什么 Windows Vista x64 上的 x86 WiX 安装程序不会将密钥写入注册表中的 Wow6432Node? [英] Why does an x86 WiX installer on Windows Vista x64 not write keys to Wow6432Node in the registry?

查看:33
本文介绍了为什么 Windows Vista x64 上的 x86 WiX 安装程序不会将密钥写入注册表中的 Wow6432Node?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个写入 HKLMSoftwareDroidExplorerInstallPath 的安装程序.在任何 x86 机器上,它都可以很好地写入预期位置,而在 Windows XP x64 和 Windows 7 x64 上,它也会写入预期位置,实际上是 HKLMSoftwareWow6432NodeDroidExplorerInstallPath.

稍后在安装过程中,我的引导程序(也是 x86)尝试读取该值.在所有 x86 Windows 机器上它都是成功的,在 Windows XP x64 和 Windows 7 x64 上,但 Windows Vista x64 无法找到密钥.如果我查看注册表,它实际上并没有将它写入 Windows Vista 上的 Wow6432Node;它将它写入 SoftwareDroidExplorerInstallPath.

如果我不强行告诉安装程序写入 Wow6432Node,它会将值写入 SoftwareDroidExplorerInstallPath,但由于 注册表反射.这适用于所有 x64 系统.

为什么 Windows Vista x64 是我遇到此问题的唯一一个?有没有办法解决这个问题?

我只想添加一个仍处于打开状态的编辑.以下建议均未解决此问题.

解决方案

注册表重定向在 Windows Vista x64 上失败的事实很奇怪,因为根据 MSDN,注册表重定向器,Windows Vista 也应该受到影响.

另一个答案中的评论,这不起作用,当我构建安装在 x64 PFiles 中的 x64 版本的应用程序时,它告诉我我正在使用 64 位安装目录并且不't allow the Win64=no"让我对您正在构建的 MSI 类型感到有些困惑.

注册表重定向只会影响 MSI 中的 32 位组件.如果 WiX 项目的目标平台是 x86,则生成的 MSI 是 32 位 MSI,所有组件都将受到注册表重定向的影响.

另一方面,如果 WiX 项目的目标平台是 x64,那么唯一会受到注册表重定向影响的组件将是那些明确标记为 Win64=no 的组件.(默认情况下,如果您的目标平台是 x64,WiX 假定所有组件都是 64 位.)

请注意,如果您的注册表项的组件包含在 ProgramFiles64 文件夹中,那么 WiX 将假定它是一个 64 位组件,并且不会受到注册表重定向的影响.这就是 WiX 不允许您在该组件上指定 Win64=no 的原因.

您应该确认每个包含您想要重定向的注册表项的组件都配置为使用 ProgramFiles(32 位),因为它是 x86 和 x64 MSI 文件中的父目录.

I have an installer that writes to HKLMSoftwareDroidExplorerInstallPath. On any x86 machine it writes just fine to the expected location, and on Windows XP x64 and Windows 7 x64 it also writes to the expected location, which is actually HKLMSoftwareWow6432NodeDroidExplorerInstallPath.

Later on during the install, my bootstrapper, which is also x86, attempts to read the value. On all x86 Windows machines it is successful, and on Windows XP x64 and Windows 7 x64, but Windows Vista x64 is unable to locate the key. If I look in the registry, it doesn't actually write it to Wow6432Node on Windows Vista; it writes it to SoftwareDroidExplorerInstallPath.

If I do not forcefully tell the installer to write to Wow6432Node, it writes the value to SoftwareDroidExplorerInstallPath, but the bootstrapper still tries to look in Wow6432Node because of the registry reflection. This is on all x64 systems.

Why is Windows Vista x64 the only one I have this issue with? Is there a way around this?

I just want to add an edit that this is still open. None of the suggestions below have yet to solve this issue.

解决方案

The fact that registry redirection is failing on Windows Vista x64 is very strange because according to MSDN, Registry Redirector, Windows Vista should also be affected by it.

A comment in another answer, "This does not work, when I build the x64 version of the application, that installs in the x64 PFiles, it tells me that I am using a 64-bit install directory and doesn't allow the Win64=no" left me a bit confused as to what type of MSIs you are building.

Registry redirection is only going to affect 32-bit components in your MSI. If the target platform for the WiX project is x86, then the resulting MSI is a 32-bit MSI and all components will be affected by registry redirection.

On the other hand, if the target platform of the WiX project is x64, then the only components that will be affected by the registry redirection will be those that are explicitly marked as Win64=no. (By default, WiX assumes that all components are 64-bit if your target platform is x64.)

Note that if the component for your registry entry is included inside the ProgramFiles64 folder, then WiX will assume that it is a 64-bit component, and it will not be affected by registry redirection. This is the reason WiX is not allowing you to specify Win64=no on that component.

You should verify that every component that contains a registry entry that you do want to be redirected is configured to use ProgramFiles (the 32-bit one) as it's the parent directory in both your x86 and your x64 MSI files.

这篇关于为什么 Windows Vista x64 上的 x86 WiX 安装程序不会将密钥写入注册表中的 Wow6432Node?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆