Changing the way the .ini files are updated
Moderators: Hacker, petermad, Stefan2, white
Changing the way the .ini files are updated
I know that updating the .ini files is handled by Windows but maybe some of the following is feasible to implement.
Doing a fair amount of testing it is crucial to be able to compare the .ini files with the backup I have of them.
But when TC is saving ini sections with enumerated items like [Associations], [ViewModes], [ViewModeSwitch], [user] and [DirMenu], the whole section is deleted and rewritten in the bottom of the .ini file. This makes it tedious to compare the .ini file with its backup, after a few of these section movings. furthermore when the updated section is written in the bottom of the file it is done without a blank line between the updated section and the section before it.
Would it be possible to insert the updated section in the same position as it was in before updating?
Would it be possible at least to have a blank line inserted before the updated section - that would make it much easier to find the section in the Compare by Content dialog, in order to resync the comparison?
Doing a fair amount of testing it is crucial to be able to compare the .ini files with the backup I have of them.
But when TC is saving ini sections with enumerated items like [Associations], [ViewModes], [ViewModeSwitch], [user] and [DirMenu], the whole section is deleted and rewritten in the bottom of the .ini file. This makes it tedious to compare the .ini file with its backup, after a few of these section movings. furthermore when the updated section is written in the bottom of the file it is done without a blank line between the updated section and the section before it.
Would it be possible to insert the updated section in the same position as it was in before updating?
Would it be possible at least to have a blank line inserted before the updated section - that would make it much easier to find the section in the Compare by Content dialog, in order to resync the comparison?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Changing the way the .ini files are updated
That's right, that's sometimes (especially in the test phase) a problem. The easiest way is to redirect the corresponding/interesting sections individually into individual files into a common subdirectory. That can then be copied quickly and easily into other subdirectories (Ini_sections, Ini_sections_old, ini_sections_20230722, ini_sections_20230721) and easily compared. This does not apply to the [configuration] section.
Just my two cents
Joube
Just my two cents
Joube
Re: Changing the way the .ini files are updated
Support++++ for the suggestion of petermad. This would make comparing and updating ini files much easier and less error prone.
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
Re: Changing the way the .ini files are updated
petermad wrote: 2023-07-22, 11:19 UTC
Would it be possible to insert the updated section in the same position as it was in before updating?
It's a very interesting feature, if possible should be implemented.
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Changing the way the .ini files are updated
Unfortunately the function WritePrivateProfileSection doesn't allow to choose the location where a section will be added.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Changing the way the .ini files are updated
2ghisler(Author)
I was afraid so. How about an extra blank line before rewritten sections - is that possible?
I was afraid so. How about an extra blank line before rewritten sections - is that possible?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Changing the way the .ini files are updated
No, unfortunately not.I was afraid so. How about an extra blank line before rewritten sections - is that possible?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Changing the way the .ini files are updated
To make a comparison, a take a section from 2 versions of the wincmd.ini and sort it.
That's the only useful way I found, to see what lines were added, changed or deleted.
That's the only useful way I found, to see what lines were added, changed or deleted.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: Changing the way the .ini files are updated
2ghisler(Author)
Your answer is based on the direct use of a function from the Windows SDK/API kit. But has no one ever written or posted a third-party library for working with such files, INDEPENDENT of these functions???
Your answer is based on the direct use of a function from the Windows SDK/API kit. But has no one ever written or posted a third-party library for working with such files, INDEPENDENT of these functions???
#146217 personal license
Re: Changing the way the .ini files are updated
Yes, me for example (as well as dozens of others), but I expect Tc in particular to use the original windows routines!Because that is exactly what the decades-long success of the Tc is based on.AntonyD wrote: 2023-07-24, 07:34 UTC But has no one ever written or posted a third-party library for working with such files, INDEPENDENT of these functions???
Re: Changing the way the .ini files are updated
Using a tool that can properly sort or compare ini-files seems a better solution to me. Regretfully, there are not much of those around so it seems.