Thorin Oakenshield Thorin Oakenshield - 1 year ago 111
C# Question

Reading a registry key in C#

I have developed an application and installed it on a client computer. In my application I need to get its installation path. My application has a registry entry at:


How can I read
using C#?

Answer Source

see this


You can use RegistryKey class under Microsoft.Win32 namespace.

Some important functions of RegistryKey are as follows:

GetValue       //to get value of a key
SetValue       //to set value to a key
DeleteValue    //to delete value of a key
OpenSubKey     //to read value of a subkey (read-only)
CreateSubKey   //to create new or edit value to a subkey
DeleteSubKey   //to delete a subkey
GetValueKind   //to retrieve the datatype of registry key
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download