Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to manage a single config file for multiple users?

Posted on 2014-02-17
5
Medium Priority
?
302 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 83

Accepted Solution

by:
David Johnson, CD, MVP earned 1500 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 56

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 56

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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

The recent Microsoft changes on update philosophy for Windows pre-10 and their impact on existing WSUS implementations.
IF you are either unfamiliar with rootkits, or want to know more about them, read on ....
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
Suggested Courses

597 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