Saturday, December 29, 2007

C#: Read value of a specific registry key

public string ReadRegistryKey(Microsoft.Win32.RegistryKey regHive, string regKey, string regName)
{
string value = null;

Microsoft.Win32.RegistryKey key = regHive.OpenSubKey(regKey);
value = (string)key.GetValue(regName);

return value;
}

No comments:

Post a Comment

Please use your common sense before making a comment, and I truly appreciate your constructive criticisms.