greymonkey
Technical User
Hi there,
Does any one know a way of retrieving information from the HKEY_LOCAL_MACHINE part of the Registry if you don’t have Admin Rights.
I am trying to get a list of Time Zones and the time offsets from UTC time.
I currently have the code:
This retrieves the info ok but only works if you have Admin Rights.
If have seen some code using the advapi32.dll file to access the registry but this all seems to be directed towards VB 6 and does not seem to work with .net 2005.
If any one has any ideas?
Thanks,
Does any one know a way of retrieving information from the HKEY_LOCAL_MACHINE part of the Registry if you don’t have Admin Rights.
I am trying to get a list of Time Zones and the time offsets from UTC time.
I currently have the code:
Code:
Dim regKey As RegistryKey
Const TimeRegAddress As String = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones"
regKey = Registry.LocalMachine.OpenSubKey(TimeRegAddress, False)
For Each innerKey As String In regKey.GetSubKeyNames
Dim tempRegKey As RegistryKey
tempRegKey = regKey.OpenSubKey(innerKey, True)
ListBox1.Items.Add(tempRegKey.GetValue("Display"))
Next
This retrieves the info ok but only works if you have Admin Rights.
If have seen some code using the advapi32.dll file to access the registry but this all seems to be directed towards VB 6 and does not seem to work with .net 2005.
If any one has any ideas?
Thanks,