Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change registry permissions

Status
Not open for further replies.

acjeff

Programmer
Aug 10, 2004
148
US
I have a VB6 application running on customer's machine (XP or 2000) in which they are free to create any users to run the VB application.

In run-time, the VB program needs to read and write registries in:

"HKEY_CURRENT_USER\Software\VB and VBA Program Settings\"

However, this registry folder is not accessible for users having limited permissions. I tried setting permission to this folder for general users but still cannot make it work.

Any ideas and thoughts?

Jeff
 

Generally, only users with admin rights are allowed to write to the registry. You might be able to get the administrator of your system to open up a particular registry key to ordinary users.
 
I did try logging in as administrator and set the permission to both "HKEY_CURRENT_USER\Software\" and "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\" to full control for restricted users. However, when I logged in as ordinary users again, it still could not access the registry by the VB program.

Any other ideas?

 
What is the difference between using INI file and just a txt file to store the configurations? Is it risky to use INI?
 
The difference lies in the ability to use the API to find a certain value in a text file named by a section. (note that you don't have to give your file a .INI file extension for the API to work with it).

If you were to not use that API then you would have to do the reading/editing of the text file through code using open, etc.
 
<What is the difference between using INI file and just a txt file to store the configurations?
The links I've provided explain that. If you have specific questions on the material in them, post them and we'll help.
<Is it risky to use INI?
No more so than using a text file.

HTH

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top