How to share INI file or data from/to the registry under Win NT (or XP pro)

Posted on 2003-03-16
Medium Priority
Last Modified: 2012-05-04
During the setup process of my program, I create a .INI file that stores many parameters and preferences.
When this program is running, the end user MUST access this ini file to get settings, change them or specify preferences.
Problem with Win NT or XP pro : Only a user having the status of an "Administrator" is allowed to install a program and, later, none of the other end users, being only "regular" ones, can access the INI file.
Instead of writing/reading these parameters in an INI file, I tried to put them in the registy but it's the same problem, as well when using the standard VB functions(SetSetting, Getsetting ... ) as by using Windows functions (RegOpenKeyEx ...)
How can I do to make it possible that ALL the users, whatever their status ("Admin." , "Power user", "Regular") can access the same INI file ?
Thank you !

Question by:MSelect
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 8147990
Where are you saving this INI file to? You can't save it anywhere in the user's profile or it won't be easy to get other people to read it.

If you aren't already, try saving the INI file in the same folder as your application executable. That way everyone should be able to access it.

Expert Comment

ID: 8148536
Saving to the registry only makes those settings visible to the one person - each person has their own version of the registry. The INI file strategy makes your settings visible to anyone who can 'see' the folder where the INI file is stored. Often however the directory where the executable is kept is read-only. What I have done in the past in this situation is have an INI file in the executable's directory that has one item - the location of a folder elsewhere in the network where the read/write INI file is kept. This location must be visible and writeable to all users.

Author Comment

ID: 8153451
Hoops ...
OS : Win XP Pro

I have installed the whole program (EXE, INI and MDB databases) in
C:\Documents and settings\All users\Documents.

It works well when I run it as an "administrator" BUT, when I'm a "simple user"
1> it can read the INI file but can't write data
2> it can't access (or open) the databases

From the Windows explorer, I have verified that the files don't have the "Read only" attribute.
Nevertheless, I can't save changes made (manually) to the INI file.

Any idea ?

Thank you very much ...
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.


Expert Comment

ID: 8511482
Dear expert(s),

A request has been made to close this Q in CS:

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.


Community Support Moderator
Experts Exchange

Accepted Solution

MSelect earned 0 total points
ID: 8511973

Again :
I have found the solution by myself, installing the whole program with INI file and database in a common folder :
...\Documents and Settings\All users\Documents\MySubFolder

This question can be closed !

Expert Comment

ID: 8572115
Points refunded and placed in PAQ

E-E Admin

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month10 days, 19 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question