Solved

How to manage a single config file for multiple users?

Posted on 2014-02-17
5
296 Views
Last Modified: 2014-02-17
Hi,

I´ve developed a VBS app which uses a text file for user´s config. The app is available to users from a NAS and they have access to update the config file to their needs.

A problem arises when users leave the config file in their text editor, just hitting save when they have made updates.  This can cause other users to lose their last updates as the file is reverted to a previous state.

I am looking for a solution whereby users can update their config without affecting others.  I thought maybe the way forward would be to provide a config app to update a non readable file, but this would lose the simplicity of a single readable config.  

Ideally the OS would mark the file as being edited therefore only 1 user at a time could update it at a time.  Whilst being updated the file must always be available in read only.  Similar to when trying to edit an Excel doc.

Any useful advice would be appreciated.

Thanks,

Matt
0
Comment
Question by:MNuttall
[X]
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
  • 2
  • 2
5 Comments
 
LVL 81

Accepted Solution

by:
David Johnson, CD, MVP earned 500 total points
ID: 39865194
You can't have a config file that is editable by everyone and keep everyone happy.  Instead save / load the config file from their own %appdata%\appname folder.
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39865622
> but this would lose the simplicity of a single readable config

I recommend giving up on that "simplicity", because trying to share a single config among multiple users actually makes things more complicated. The simplicity will come from each user having his own config file. There are choices of where to store each user's config file. Depending on the app, sometimes I'll put it in the folder where the app/script is, other times in the AppData folder (which the global variable %appdata% contains). Regards, Joe
0
 

Author Closing Comment

by:MNuttall
ID: 39865806
Ok, I'll adopt a local config approach.
Many thanks for the quick response.
0
 

Author Comment

by:MNuttall
ID: 39865813
Joe, thanks for your comment. I would have shared the points but I'm new to this!
0
 
LVL 54

Expert Comment

by:Joe Winograd, EE MVE 2015&2016
ID: 39865854
You're welcome...and don't worry about the points in this case. But the points are important to the experts, so it would behoove you to learn how to share the points. The basic technique is to click "Accept Multiple Solutions" on one of the answers and then assign point values to the multiple answers until they add up to the value of the question (such as 500 for this one). I'm sure you'll get the hang of it. And if you ever make a really bad mistake, such as accepting a post that you did not intend to accept, you can click the "Request Attention" link (under your original post on the right side) and ask for the question to be re-opened. An EE admin will re-open the question for you and you may then re-assign the points. All-in-all, we're a very friendly community. :)  Welcome aboard! Regards, Joe
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

691 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