problem accessing the registry with Vista

R

Rob Latour

The following snippet (vb.net 2005) is working just fine in xp but not in
vista

in xp it lists all related sub keys in the registry just fine. in vista it
doesn't list certain ones (like Unimodem)

Dim rk As Microsoft.Win32.RegistryKey
rk =
My.Computer.Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion")
For Each SubKeyName As String In rk.GetSubKeyNames()
Console.WriteLine(SubKeyName)
Next

Although this is not my real problem, i figure if i knew why its not working
in the above code i would have my real problem solved too.

I had tried fooling around with
System.Security.AccessControl.RegistryAccessRule statements, but either i'm
doing them wrong or i'm barking up the wrong tree.

any and all help would be appreciated.

Thanks, Rob
 
K

Kevin Spencer

The user identity under which the program is running must have permission to
read the registry keys you want to read.

--
HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net
 
R

Rob Latour

Thanks Kevin, would it be possilbe that you could provide an example of how
I can grant this access?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top