问题
I want to check that I have permissions on a RegistryKey for example can I read values and write values. This blog enumerates permissions
http://blogs.msdn.com/b/bclteam/archive/2006/01/06/509867.aspx
How can I go from GetAccessControl() to knowing that I have for example FullControl?
回答1:
I'm afraid there is no managed code for this. you could use a dllimport and invokeCheckAccess but i prefer just accessing the registry and handling the exception (if any)
来源:https://stackoverflow.com/questions/4947526/how-can-i-check-for-registrykey-permissions-like-readkey-or-fullcontrol-in-net