Re: Best way to store "registry" config data for portable apps?
From: Joseph M. Newcomer (newcomer_at_flounder.com)
Date: 05/19/04
- Next message: Joseph M. Newcomer: "Re: TCHAR* and PostMessage in a thread .. memory leak question"
- Previous message: Joseph M. Newcomer: "Re: Has anyone got an example of using CAsyncSocket to connect and read/write data to an internet connection?"
- In reply to: John: "Best way to store "registry" config data for portable apps?"
- Next in thread: John: "Re: Best way to store "registry" config data for portable apps?"
- Reply: John: "Re: Best way to store "registry" config data for portable apps?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 May 2004 18:11:02 -0400
The notion of per-directory initialization is common. But in the cases where I need that,
I prefer to use XML representations, rather than .INI files, for all the previuosly cited
reasons: XML, like the Registry, is hierarchical, can store complex information easily,
and do not have artificial upper bounds on the amount of data. .INI files require complex
data require a complex parser (while XML uses a complex parser, it is the same parser as
every other XML data structure uses). But the parsing was always a problem (as I say,
think about how you would store window placement data, fonts, and similar complex
information using a .INI file.
Driver information is HKEY_LOCAL_MACHINE, and as such, it would not make sense to have
multiple instances of this.
So if I needed to keep this information local, I'd use XML. What I tend to do right now is
do queries into the XML structure to locate the attribute I need, and then I can iterate
the subtrees or use attributes to retrieve the attributes I need.
I've thought about writing this up, but I need to seriously "sanitize" it to remove
proprietary code before I can write it up, and I have limited time right now.
joe
On Wed, 19 May 2004 14:53:15 GMT, John <zjboyguard-newsgrpsDELETETHISTOUSE@yahoo.com>
wrote:
>On Tue, 18 May 2004 00:58:10 -0400, Joseph M. Newcomer <newcomer@flounder.com> wrote:
>> It is a simple choice. .INI files are obsolete. So there is no decision process involved.
>
>Joe,
>
>I don't actually disagree with you, but I have a question in another direction. The questions pretty much boils down to how to deal with a problem which I think the registry is not designed to address.
>
>I have one of those 256MB portable USB portable storage thingee's. I've noticed that whenever you install or run a Windows app from this USB drive, the app stores/extracts it's usage info from the system registry. This doesn't sound like it would be a problem, but in practice I've found it has annoying consequences.
>
>An aspect of an app specific .INI file which I (think I) like is that if you have the same app installed on different media the configuration data for the app is easily localized to the separate .INI files stored with the app.
>
>Is there some "standard"/recommended way to store "portable" configuration data in Windows? A way to save app config/install info which is specific to the media you're running the application from?
>
>-irrational john
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
- Next message: Joseph M. Newcomer: "Re: TCHAR* and PostMessage in a thread .. memory leak question"
- Previous message: Joseph M. Newcomer: "Re: Has anyone got an example of using CAsyncSocket to connect and read/write data to an internet connection?"
- In reply to: John: "Best way to store "registry" config data for portable apps?"
- Next in thread: John: "Re: Best way to store "registry" config data for portable apps?"
- Reply: John: "Re: Best way to store "registry" config data for portable apps?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|