Question Registry Permission

aljeff

Member
Joined
Feb 20, 2012
Messages
13
Programming Experience
Beginner
Hello, Everyone.

Could you help me on this.
I can't start to program on getting the registry security permission of a given registry path.

I attached the screenshot of what I wanted to get on a certain registry hive. Permission entries in the box to be exact.

I hope you could give me some snippets of a code for this.

Just 1/10 in VB.Net.

Really appreciate if you could help.

Frustrated with this. :(
 

Attachments

  • RegPermission.jpg
    RegPermission.jpg
    118.9 KB · Views: 33
Hello, Everyone.

Could you help me on this.
I can't start to program on getting the registry security permission of a given registry path.

I attached the screenshot of what I wanted to get on a certain registry hive. Permission entries in the box to be exact.

I hope you could give me some snippets of a code for this.

Just 1/10 in VB.Net.

Really appreciate if you could help.

Frustrated with this. :(


Just a follow.

I hope you can reply guys.

user input HKLM\Software\TestKey

System - Full Control - This key and subkeys
Adminstrator -Full Control - This key and subkeys
User - Special - This key
Power Users - Special - This key

Here's what I started but seems it did not worked

Const TestKey As String = "TestKey\Key1"
Dim HKLM As RegistryKey = Registry.LocalMachine
Dim testHKLM As RegistryKey = HKLM.OpenSubKey(TestKey)
'Dim regSecurity As RegistrySecurity = testHKLM.GetAccessControl()
Dim regSecurity As New RegistrySecurity(testHKLM)

For Each registryPermission As Security.AccessControl.RegistryAccessRule In regSecurity.GetAccessRules(True, True, GetType(NTAccount))
 
ListBox1.Items.Add(registryPermission.IdentityReference.Value &
" - " & registryPermission.RegistryRights)
'ListBox1.Items.Add(registryPermission.RegistryRights)
Next

I have errors.
 
Back
Top