V
vovan
I'm using this approach to read from registry.
Dim f As New RegistryPermission(RegistryPermissionAccess.AllAccess, _
"HKEY_LOCAL_MACHINE\SOFTWARE\SRS
Enterprises\Coordinator\Settings")
'Vlad 02/12/2007
Dim f2 As New
RegistryPermission(RegistryPermissionAccess.AllAccess, _
"HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\SRS
Enterprises\Coordinator\Settings")
Dim pRegKey As RegistryKey = Registry.LocalMachine
pRegKey.OpenSubKey("SOFTWARE\\SRS
Enterprises\\Coordinator\\Settings")
Dim val As Object = pRegKey.GetValue("CSSLQN")
It works on Windows XP, on Windows Server 2003. It doesn't work on Vista
Business. pRegKey.GetValue("CSSLQN") returns null. The key with value
exists.
What should I add to my code to get the value from a registry?
Thank you
Vovan
Dim f As New RegistryPermission(RegistryPermissionAccess.AllAccess, _
"HKEY_LOCAL_MACHINE\SOFTWARE\SRS
Enterprises\Coordinator\Settings")
'Vlad 02/12/2007
Dim f2 As New
RegistryPermission(RegistryPermissionAccess.AllAccess, _
"HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\SRS
Enterprises\Coordinator\Settings")
Dim pRegKey As RegistryKey = Registry.LocalMachine
pRegKey.OpenSubKey("SOFTWARE\\SRS
Enterprises\\Coordinator\\Settings")
Dim val As Object = pRegKey.GetValue("CSSLQN")
It works on Windows XP, on Windows Server 2003. It doesn't work on Vista
Business. pRegKey.GetValue("CSSLQN") returns null. The key with value
exists.
What should I add to my code to get the value from a registry?
Thank you
Vovan