public static RegistryKey GetKey(string baseKey)
{
RegistryKey key;
try
{
key = Registry.LocalMachine.OpenSubKey(baseKey, true);
if (key == null)
{
key = Registry.LocalMachine.CreateSubKey(baseKey);
}
else
{
MessageBox.Show("Base key resolved");
}
}
catch (Exception e)
{
return null;
}
return key;
}
You need to create an account or log in to post comments to this site.