Home > DeveloperSection > Forums > How to access registry keys in C#
Anupam Mishra

Total Post:135

Points:949
Posted on    January-20-2016 6:01 AM

 C# C#  .NET 
Ratings:


 1 Reply(s)
 200  View(s)
Rate this:
I want to retrieve a subkeys under the registry key(any root key) in my local machine. Please give me a solution.

thank you.


Anupam Mishra

Total Post:135

Points:949
Posted on    January-21-2016 3:07 AM

Here, we want to access of existing subkey (i have already created subkeys. ) value.
for retrieving subkey values, we used GetValue method . code is below: 

        RegistryKey key;
                key = Registry.CurrentUser.OpenSubKey("Anupam Software");
                String s = (String)key.GetValue("Anupam");
                Console.WriteLine("Registry Value: " + s);

Output:

My Software


Modified On Jan-21-2016 03:08:42 AM

Don't want to miss updates? Please click the below button!

Follow MindStick