调整了远程锁机和解锁接口
This commit is contained in:
parent
8c6c3363b8
commit
5710bf9005
|
@ -22,11 +22,11 @@ public static class RegistryHelper
|
||||||
public static void DeleteValue(string keyPath, string valueName)
|
public static void DeleteValue(string keyPath, string valueName)
|
||||||
{
|
{
|
||||||
using var key = Registry.CurrentUser.OpenSubKey(keyPath, writable: true);
|
using var key = Registry.CurrentUser.OpenSubKey(keyPath, writable: true);
|
||||||
key?.DeleteValue(valueName);
|
key?.DeleteValue(valueName, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void DeleteKey(string keyPath)
|
public static void DeleteKey(string keyPath)
|
||||||
{
|
{
|
||||||
Registry.CurrentUser.DeleteSubKeyTree(keyPath, throwOnMissingSubKey: false);
|
Registry.CurrentUser.DeleteSubKeyTree(keyPath, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue