Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi. My program saves Form location values to HKCU in the registry. That works fine with an admin account, but works intermittently with a Limited account. I used to believe that a Limited account can read and write without any special permissions. Here is my code: (Sorry i don't know how to properly attach the code)

to write:

My.Computer.Registry.CurrentUser.CreateSubKey("Test")
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Test","x",me.left)
My.Computer.Registry.SetValue("HKEY_CURRENT_USER\Test","y",me.top)


to read:

dim xleft,yleft as string

xleft = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Test", "x", nothing)
yleft = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Test", "y", nothing)
Posted
Updated 13-Jan-15 1:20am
Comments
vbGoof 13-Jan-15 10:16am    
Ok thanks, i guess i'll just have to write to a file. Before i updated my windows 7, it worked just fine.Thanx

1 solution

A limited account will need permissions to registry to read and to write.
If you do not have permissions, there is no way you can bypass these permissions and read the registry.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900