protected static string RegKeyGetValue(WinRegSystem wRegSystem, WinRegKey wRegKey) { try { RegistryKey rk = RegGetAppKey(wRegSystem); if (rk.GetValue(wRegKey.ToString()) != null) { return(rk.GetValue(wRegKey.ToString(), string.Empty).ToString()); } else { return(string.Empty); } } catch (Exception ex) { throw ex; } }
protected static void RegKeySetValue(WinRegSystem wRegSystem, WinRegKey wRegKey, object value, RegistryValueKind valueKind = RegistryValueKind.DWord) { try { RegistryKey rk = RegGetAppKey(wRegSystem, WinRegMode.Write); rk.SetValue(wRegKey.ToString(), value, valueKind); rk.Close(); } catch (Exception ex) { throw ex; } }