Registry rights
Discussion
Im having a real doh moment currently, and cant for the life of me work out a way round it, so if it is easy im willing to sit in the corner for a while!
All users log on as user.
I am trying to run a program I have written in VB that accesses the registry, unfortunately the values are coming back blank unless im logged in as an administrator.
Can anyone suggest another method other than logging everyone on as administrator????
All users log on as user.
I am trying to run a program I have written in VB that accesses the registry, unfortunately the values are coming back blank unless im logged in as an administrator.
Can anyone suggest another method other than logging everyone on as administrator????
If you only want to read registry values, you need to open the registry in read-only mode.
Don't know how you do this in VB. If it's any help then in C++ you'd call RegOpenKeyEx with the samDesired parameter set to KEY_READ or KEY_QUERY_VALUE instead of the default KEY_ALL_ACCESS
Edit: With a Restricted User account you don't have write access to HKEY_LOCAL_MACHINE (HKLM) but you do to HKEY_CURRENT_USER (HKCU), so if you need write access then consider redesigning your app to use HKCU.
Edit2: You may want to read this Ask Dr. GUI article and also MSDN Knowledge Base Article Q145679
>> Edited by JonRB on Thursday 27th January 13:25
Don't know how you do this in VB. If it's any help then in C++ you'd call RegOpenKeyEx with the samDesired parameter set to KEY_READ or KEY_QUERY_VALUE instead of the default KEY_ALL_ACCESS
Edit: With a Restricted User account you don't have write access to HKEY_LOCAL_MACHINE (HKLM) but you do to HKEY_CURRENT_USER (HKCU), so if you need write access then consider redesigning your app to use HKCU.
Edit2: You may want to read this Ask Dr. GUI article and also MSDN Knowledge Base Article Q145679
>> Edited by JonRB on Thursday 27th January 13:25
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


