调整了远程锁机和解锁接口

This commit is contained in:
huangxianguo 2024-09-05 19:56:27 +08:00
parent 8c6c3363b8
commit 5710bf9005
1 changed files with 2 additions and 2 deletions

View File

@ -22,11 +22,11 @@ public static class RegistryHelper
public static void DeleteValue(string keyPath, string valueName)
{
using var key = Registry.CurrentUser.OpenSubKey(keyPath, writable: true);
key?.DeleteValue(valueName);
key?.DeleteValue(valueName, false);
}
public static void DeleteKey(string keyPath)
{
Registry.CurrentUser.DeleteSubKeyTree(keyPath, throwOnMissingSubKey: false);
Registry.CurrentUser.DeleteSubKeyTree(keyPath, false);
}
}