A universal approach for storing INI-type settings and / or DB files on various Windows machines

OK, a true admission first: maybe it's just me, but sometimes the “best practices for program settings” on Windows machines feel that they have changed more than Microsoft’s data access strategies. I am still running XP, and somewhere along the way I just "glazed" about where MS wants me to save all the data of my application, etc. I controlled all the machines for which I encoded, so it really didn't matter.

Now I am writing applications for "in the wild", supporting Win98SE. I have to pay attention to all this again.: - \

For reasons related to the ease of transition to new computers, I am not a big fan of using registry settings for applications - I prefer to use INI files and have some old INI components that I use for the task (Raize, usually). I am open to suggestions to other third-party components if they make it easier / less hassle.

Basically, I need to save the application settings (for example, remember the parameter settings, etc.).

I read: Registry and INI file for saving user custom application settings
Where can I save program settings instead of HKEY_LOCAL_MACHINE?
Where will my win32 program store its files?
Best place to store configuration files and log files in Windows for my program?

... so at least I'm not alone in this matter ...; )
(with an apology for being a bit of a repetitive question, albeit from a slightly different angle).

These are SOUNDS, how can I just use% APPDATA% / MyProgram and store all the data there, BUT is it UNIVERSALLY TRUE in all kinds of Windows from Win98SE? If not, what is the best approach and when did this approach come about?

What I'm really looking for, honestly, is the easiest way to fix this problem - I just want one (if possible), simple, simple and reliable way to capture the "Program Data Folder" in any and all cases. Will this do it?

+3
source share
5 answers

Delphi Vista-Ready : " ?"

GetRoamingUserAppDataPath: ; // , IE 4. ( Win95 )

+5

% APPDATA% Win95. SHGetSpecialFolderPath, Win98 Win95 w/IE4.

+3

, , , , , , , .

INI- / DB

. , , , , , , .

, CSIDL_APPDATA CSIDL_PERSONAL.

, , , () .

, , , Windows, . - , , - . , , - , , , .

, , .

, , - , Paradox Access, , . () /.

+2

, , , , , .ini - . XP , - . , - .ini.

I think the whole bit of the registry was an anti-piracy measure that they wanted to hide as best practice.

0
source

I use xml files in% APPDATA% to store my settings. Only really, because xml is simpler than ini for C #. Despite this,% APPDATA% really seems safe.

I cannot tell if 98SE supports this.

0
source

Source: https://habr.com/ru/post/1705488/


All Articles