KEY_WRITE (0x20006) Combines the STANDARD_RIGHTS_WRITE, KEY_SET_VALUE, and KEY_CREATE_SUB_KEY access rights.When you call the RegOpenKeyEx function, the system checks the requested access rights against the key's security descriptor. If the user does not have the correct access to the regis...
Receives the handle to the registry key. This handle is opened with all access rights. For more information, seeRegistry Key Security and Access Rights. Return value If the method succeeds, the return value isS_OK. Otherwise, the method returns one of the COM error codes defined in the Plat...
public void SetAccessControl (System.Security.AccessControl.RegistrySecurity registrySecurity); 参数 registrySecurity RegistrySecurity 要应用于当前子项的访问控制安全性。 例外 UnauthorizedAccessException 当前的 RegistryKey 对象表示一个具有访问控制安全性的项,并且调用方没有 ChangePermissions 权限。 ArgumentNull...
OpenSubKey(String, RegistryKeyPermissionCheck, RegistryRights) 检索指定的子项以进行读取或读/写访问,请求指定的访问权限。 OpenSubKey(String, RegistryRights) 检索具有指定名称和访问权限的子项。 从 .NET Framework 4.6 开始可用。 SetAccessControl(RegistrySecurity) 向现有注册表项应用 Windows 访问控制安全...
組件: Microsoft.Win32.Registry.AccessControl.dll 變更現有登錄機碼的安全性屬性。 C# 複製 public static void SetAccessControl (this Microsoft.Win32.RegistryKey key, System.Security.AccessControl.RegistrySecurity registrySecurity); 參數 key RegistryKey 現有的登錄機碼。 registrySecurity RegistrySecurity ...
usingSystem;usingSystem.Reflection;usingSystem.Security;usingSystem.Security.AccessControl;usingMicrosoft.Win32;publicclassExample{publicstaticvoidMain(){// Delete the example key if it exists.try{ Registry.CurrentUser.DeleteSubKey("RegistryRightsExample"); Console.WriteLine("Example key has been deleted....
RegistryKey 實作 IDisposable 範例 下列程式代碼範例示範如何在HKEY_CURRENT_USER下建立子機碼、操作其內容,然後刪除子機碼。 C#複製 usingSystem;usingSystem.Security.Permissions;usingMicrosoft.Win32;classRegKey{staticvoidMain(){// Create a subkey named Test9999 under HKEY_CURRENT_USER.RegistryKey test9999...
RegistryAccessRule RegistryAuditRule RegistryRights RegistrySecurity RegistrySecurity 构造函数 属性 方法 AccessRuleFactory AddAccessRule AddAuditRule AuditRuleFactory RemoveAccessRule RemoveAccessRuleAll RemoveAccessRuleSpecific RemoveAuditRule RemoveAuditRuleAll ...
“Error Opening Key – [registry key] cannot be opened. An error is preventing this key from being opened. Details: Access is denied.”– This pops up when your user account lacks the needed permissions to access a registry key. “Windows Security – You do not have permission to view th...
The App Paths key provides a mechanism that allows programmers to make their application startable by name only without having to modify the system-wide path. Why would they do that? Vanity and overestimation of the importance of one’s own application. But, hey, it sometimesdoescome in ...