Ejemplo n.º 1
0
 public static string GetRegValue(RegKeyValues ValueName)
 {
     PrepareReg();
     string ReturnMe = string.Empty;
     string[] arr = Registry.LocalMachine.OpenSubKey("SOFTWARE\\ECM", false).GetValueNames();
     for (int i = 0; i < arr.Length; i++)
     {
         if (arr[i] == ValueName.ToString())
         {
             ReturnMe = (string)Registry.LocalMachine.OpenSubKey("SOFTWARE\\ECM", false).GetValue(ValueName.ToString());
             break;
         }
     }
     return ReturnMe;
 }
Ejemplo n.º 2
0
 public static void SetRegValue(string KeyValue, RegKeyValues ValueName)
 {
     PrepareReg();
     RegistryKey X = Registry.LocalMachine.OpenSubKey("SOFTWARE\\ECM", true);
     X.SetValue(ValueName.ToString(), KeyValue);
 }