User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Computer Science and Software Design section within the Software Development category of DaniWeb, a massive community of 427,219 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,242 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Computer Science and Software Design advertiser: Programming Forums
Views: 615 | Replies: 6 | Solved
Reply
Join Date: Dec 2007
Posts: 3
Reputation: cheers4beer is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cheers4beer cheers4beer is offline Offline
Newbie Poster

Question File type help

  #1  
Dec 19th, 2007
I want to store data that will be read from and written to by two executable files. This data file will be used to store settings that are common to both executables. To keep the user from inadvertantly modifying the data file, I would like to limit its write access. Ideally, the write access would be limited to the two executables. Also, it would be nice to have the data file be unreadable, encrypted, or un-openable to keep the user from viewing the data file. Is all of this possible? If so, which file type should I use to store the data?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2005
Posts: 3,639
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 22
Solved Threads: 418
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: File type help

  #2  
Dec 19th, 2007
All of those things will not stop the determined (or the incompetent) from modifying the file.

What's wrong with a nice simple text file, with a banner at the top which reads something like
# This file is auto-generated. Any changes you make could be lost
# or cause the programs to fail in unexpected ways.

It seems to work for a lot of other programs.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Join Date: Dec 2007
Posts: 3
Reputation: cheers4beer is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cheers4beer cheers4beer is offline Offline
Newbie Poster

Re: File type help

  #3  
Dec 19th, 2007
Thanks for your quick response to my first question. Would a text file be the most professional way to save the settings for an executable? I'll give an example to clarify what I mean by 'settings'. In IE7 under the tools menu, there is an option to turn the popup blocker on or off. When you make your selection(on/off), I'm guessing there is a value in a data file somewhere that is changed. I assume that there would be an if/then statement in the IE7 code based on this setting value. I have looked through the 'Internet Explorer' folder on my computer and can't find a text file. So, what kind of file is IE7 or most mainstream programs using to store user defined settings?
Reply With Quote  
Join Date: Sep 2004
Posts: 6,333
Reputation: Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of Narue has much to be proud of 
Rep Power: 28
Solved Threads: 458
Super Moderator
Narue's Avatar
Narue Narue is offline Offline
Expert Meanie

Re: File type help

  #4  
Dec 19th, 2007
>Would a text file be the most professional way to save the settings for an executable?
Why wouldn't it be? If you don't need anything more sophisticated it would be unprofessional to push more of a solution than you require.

>So, what kind of file is IE7 or most mainstream programs using to store user defined settings?
If I were to guess, I'd guess that it's adding and updating keys in the registry. That's not a recommended practice.
I'm a programmer. My attitude starts with arrogance, holds steady at condescension, and ends with hostility. Get used to it.
Reply With Quote  
Join Date: Dec 2005
Posts: 3,639
Reputation: Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of Salem has much to be proud of 
Rep Power: 22
Solved Threads: 418
Colleague
Salem's Avatar
Salem Salem is offline Offline
void main'ers are DOOMed

Re: File type help

  #5  
Dec 19th, 2007
> In IE7 under the tools menu, there is an option to turn the popup blocker on or off.
Windows has this massive global variable called the registry.

> Would a text file be the most professional way to save the settings for an executable?
In the absence of compelling alternative requirements, there's no need to make settings unreadable by using some proprietary encoding format. Even Microsoft is coming around to the idea that what users really like is nice open standards for storing THEIR data, not some proprietary binary format which changes every couple of years and renders their precious data obsolete (and unsupported).
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
Do not PM me for help; You'll be ignored, or told to learn to read.
Do not ask me if I'm muslim - I'm not. Nor do I care about yours or anyone else's mysticism. Religion is a matrix, take the RED PILL.
Reply With Quote  
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,876
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 11
Solved Threads: 193
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: File type help

  #6  
Dec 19th, 2007
Further, depending on your choice of programming language, it is likely you can find free software libraries that will store all your configuration data in a structured text file format, for example: XML or even (gasp!) INI.
Reply With Quote  
Join Date: Dec 2007
Posts: 3
Reputation: cheers4beer is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cheers4beer cheers4beer is offline Offline
Newbie Poster

Re: File type help

  #7  
Dec 21st, 2007
Thanks to all for the advice. I consider this problem solved.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Computer Science and Software Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Computer Science and Software Design Forum

All times are GMT -4. The time now is 11:20 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC