This will bomb as not accetpable. If you change it to currentuser if you
have admin success it shoudl proceed without problem.
Sub Test3()
Dim regKey As Microsoft.Win32.RegistryKey =
Microsoft.Win32.Registry.LocalMachine
Try
regKey.OpenSubKey("console",
Microsoft.Win32.RegistryKeyPermissionCheck.ReadWri teSubTree,
System.Security.AccessControl.RegistryRights.Delet e).ToString()
Catch ex As Exception
MessageBox.Show("The specified access to the key was not
possible")
End Try
End Sub
"YXQ" <ga***@163.comwrote in message
news:uB**************@TK2MSFTNGP02.phx.gbl...
>I am very grateful if you can give full code.
"vbnetdev" <ad***@kjmsolutions.comдÈëÏûÏ¢
news:%2****************@TK2MSFTNGP04.phx.gbl...
>Public Function GetAccessControl As RegistrySecurity
Dim instance As RegistryKey
Dim returnValue As RegistrySecurity
returnValue = instance.GetAccessControl
"YXQ" <ga***@163.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
>>How to detect programmatically if current user has the deleting
permission to delete a Registry key in VS 2005? thank you very much!