值不在C#中给定路径的注册表中更新 [英] Value not update in registry at given path in C#

查看:56
本文介绍了值不在C#中给定路径的注册表中更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C#中给定路径的注册表中没有更新值



string path = @Software \ Microoft \ Windows NT \ CurrentVersion \ Windows \ ; RegistryKey myKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path,true); myKey.SetValue(USERProcessHandleQuota,50000,RegistryValueKind.DWord); myKey.Close();



而不是给定的路径值更新: - @Software \Wow6432Node\Microsoft \ Windows NT \ CurrentVersion \ Windows \;



我的尝试:



i想要在以下路径更新USERProcessHandleQuota中的值

@Software \ Microoft \ Windows NT \ CurrentVersion\Windows \

value not update in Registry at given path in C#

string path = @"Software\Microsoft\Windows NT\CurrentVersion\Windows\"; RegistryKey myKey = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(path, true); myKey.SetValue("USERProcessHandleQuota", 50000, RegistryValueKind.DWord); myKey.Close();

instead of given path value update at :- @"Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Windows\";

What I have tried:

i want to update value in USERProcessHandleQuota at below path
@"Software\Microsoft\Windows NT\CurrentVersion\Windows\"

推荐答案

它与您的应用程序有关。如果您的应用程序是32位,那么它将被重定向到Wow32。如果您仍想要操作非Wow32值,则必须指定RegistryView。
It has to do with your application. If your application is 32 bit, then it gets redirected to Wow32 instead. If you still want to manipulate the non Wow32 values though, you have to specify the RegistryView.


这篇关于值不在C#中给定路径的注册表中更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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