Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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\"
Posted
Updated 8-Jan-18 0:01am
v2
Comments
Richard MacCutchan 8-Jan-18 4:56am    
I think you need administrator privilege to update HKLM entries.
Kornfeld Eliyahu Peter 8-Jan-18 5:39am    
There are lot of options for failure... https://docs.microsoft.com/en-us/dotnet/api/microsoft.win32.registrykey.setvalue?view=netframework-4.7
Check yours against the list...

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900