problem accessing the registry with Vista

  • Thread starter Thread starter Rob Latour
  • Start date Start date
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
 
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
 
Thanks Kevin, would it be possilbe that you could provide an example of how
I can grant this access?
 
Back
Top