.NET Programming
--
Questions
--
Followers
Top Experts
How to open a key in RegEdit?
Is there any command line to open a key/value in RegEdit?
eg. I have the registry value
HKEY_LOCAL_MACHINE\SOFTWAR E\Microsof t\Windows\ CurrentVer sion\Commo nFilesDir
I want to open RegEdit and it should show that value instead of the last key I opened.
I don't want any third party software. If there is no way, can we do it programatically in C#?
eg. I have the registry value
HKEY_LOCAL_MACHINE\SOFTWAR
I want to open RegEdit and it should show that value instead of the last key I opened.
I don't want any third party software. If there is no way, can we do it programatically in C#?
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
ASKER CERTIFIED SOLUTION
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Thanks a lot Jinx IT it really helps!
Just 1 more problem.
When I run the script it's alright, but when I do it in C# (my code below) I got UnauthorizedAccessExceptio n...
Any idea?
Just 1 more problem.
When I run the script it's alright, but when I do it in C# (my code below) I got UnauthorizedAccessExceptio
Any idea?
RegistryKey tmpkey = Registry.CurrentUser.OpenSubKey(
@"Software\Microsoft\Windows\CurrentVersion\Applets\Regedit");
tmpkey.SetValue("LastKey", @"My Computer\"+path);
Nup sorry, cant help with that one :)






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
.NET Programming
--
Questions
--
Followers
Top Experts
The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.