从32位应用程序创建64位的注册表项(非WOW64)

编程入门 行业动态 更新时间:2024-10-28 07:26:39
本文介绍了从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)

本文发布于:2023-05-25 12:58:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/228603.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:注册表   应用程序

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!