D
DuboisP
Hello
I'm writing a small program un vb.net 2005, and i need a read access to
the keys of HKLM\System\ControlSet\Enum.
It's working under Windows2000 and probably XP, but not with Vista and
Seven, where the securities are stronger.
It must work for regular users
Here the piece of code, and i have a security violation
Dim regPermission As RegistryPermission
regPermission = New RegistryPermission(RegistryPermissionAccess.Read,
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum")
regPermission.SetPathList(RegistryPermissionAccess.Read,
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum")
oCurrentKey = Registry.LocalMachine
oCurrentKey = oCurrentKey.OpenSubKey("SYSTEM\CurrentControlSet\Enum")
oSubKeyNames = oCurrentKey.GetSubKeyNames()
What's wrong ?
Is it possible ?
Thanks
Patrick
I'm writing a small program un vb.net 2005, and i need a read access to
the keys of HKLM\System\ControlSet\Enum.
It's working under Windows2000 and probably XP, but not with Vista and
Seven, where the securities are stronger.
It must work for regular users
Here the piece of code, and i have a security violation
Dim regPermission As RegistryPermission
regPermission = New RegistryPermission(RegistryPermissionAccess.Read,
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum")
regPermission.SetPathList(RegistryPermissionAccess.Read,
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum")
oCurrentKey = Registry.LocalMachine
oCurrentKey = oCurrentKey.OpenSubKey("SYSTEM\CurrentControlSet\Enum")
oSubKeyNames = oCurrentKey.GetSubKeyNames()
What's wrong ?
Is it possible ?
Thanks
Patrick