• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

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

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 !

1 Solution
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.
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.
MSelectAuthor Commented:
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 ...
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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
MSelectAuthor Commented:

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 !
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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now