File type help

Please support our Computer Science advertiser: Learn about neural networks and artificial intelligence.
Thread Solved

Join Date: Dec 2007
Posts: 3
Reputation: cheers4beer is an unknown quantity at this point 
Solved Threads: 0
cheers4beer cheers4beer is offline Offline
Newbie Poster

File type help

 
0
  #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?
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,851
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: File type help

 
0
  #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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 3
Reputation: cheers4beer is an unknown quantity at this point 
Solved Threads: 0
cheers4beer cheers4beer is offline Offline
Newbie Poster

Re: File type help

 
0
  #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 Quick reply to this message  
Join Date: Sep 2004
Posts: 7,567
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 706
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: File type help

 
0
  #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 here to prove you wrong.
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,851
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: File type help

 
0
  #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).
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 1,951
Reputation: Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of Duoas has much to be proud of 
Solved Threads: 214
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: File type help

 
1
  #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 Quick reply to this message  
Join Date: Dec 2007
Posts: 3
Reputation: cheers4beer is an unknown quantity at this point 
Solved Threads: 0
cheers4beer cheers4beer is offline Offline
Newbie Poster

Re: File type help

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

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC