从32位应用程序创建64位的注册表项(非WOW64) [英] Create 64 bit registry key (non-WOW64) from a 32 bit application

查看:234
本文介绍了从32位应用程序创建64位的注册表项(非WOW64)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Visual Studio安装程序正在创建一些注册表项:

I have a Visual Studio installer that is creating some registry keys:

HKEY_LOCAL_MACHINE\SOFTWARE\MyApp

但它创建注册表项Wow6432Node下自动出现:

but the registry keys it is creating are automatically appearing under Wow6432Node:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyApp

我如何忽略Wow6432Node由MSI执行在我的C#code创建注册表项时?

How do I ignore the Wow6432Node when creating registry keys in my C# code being executed by the msi?

推荐答案

仅供参考,.NET 4.0支持这个本身。例如:

Just FYI, .NET 4.0 supports this natively. Example:

RegistryBase = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64);

您可以再使用的 RegistryBase 变量来访问任何在HKLM的64位视图。相反, Registry32 将让64位应用程序的访问注册表的32位视图。

You can then use that RegistryBase variable to access anything in the 64-bit view of HKLM. Conversely, Registry32 will let a 64-bit application access the 32-bit view of the registry.

这篇关于从32位应用程序创建64位的注册表项(非WOW64)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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