[BUG]RedirectSection=1 and AlternateUserIni=

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Drudatz
Junior Member
Junior Member
Posts: 3
Joined: 2006-10-05, 17:22 UTC

[BUG]RedirectSection=1 and AlternateUserIni=

Post by *Drudatz »

If i part my Ini like this

Code: Select all

[1024x768 (8x16)]
AlternateUserIni=%Commander_Path%\Inis\[1024x768 (8x16)]
RedirectSection=1
[1280x1024 (8x16)]
AlternateUserIni=%Commander_Path%\Inis\[1280x1024 (8x16)]
RedirectSection=1
[800x600 (8x16)]
AlternateUserIni=%Commander_Path%\Inis\[800x600 (8x16)]
RedirectSection=1
[Buttonbar]
AlternateUserIni=%Commander_Path%\Inis\[Buttonbar]
RedirectSection=1
.
.
.
[Configuration]
RedirectSection=1
AlternateUserIni=%Commander_Path%\Inis\[Configuration]
UseIniInProgramDir=7
TC ONLY cares for the File %Commander_Path%\Inis\[Configuration]
make the Redirection stuff pretty useless...

Hopefully this will be fixed :!: :D
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Drudatz
It seems you have misunderstood this a bit. AlternateUserIni can only be used in Configuration. It's used to control where the redirected section are stored. Which sections are redirected by default is documented in the help.
RedirectSection can be used in any section. 0 and 1 will enable or disable the redirection. If set to 1 the section will be redirected to the file name given in AlternateUserIni. 0 excludes the section from redirection. But you can also set RedirectSection to a file name!
Drudatz
Junior Member
Junior Member
Posts: 3
Joined: 2006-10-05, 17:22 UTC

Post by *Drudatz »

Thx :!:
RedirectSection=%Commander_Path%\Inis\[<Section>]
did the trick...
should be documented better :!:

But why doenst work
RedirectSection=1
AlternateUserIni=%Commander_Path%\Inis\[<Section>]
should do the same :?:
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

AlternateUserIni= can only be defined in the [Configuration] section, and only once.

Example:
When you define AlternateUserIni=external.ini in the [Configuration] section, every section with an RedirectSection=1 line will be written to external.ini instead. Except for [Configuration] section which cannot be redirected for obvious reasons.


If you want a section to be written to another file than the one defined with AlternateUserIni you use RedirectSection=<path\anyname>

Example:
[User]
RedirectSection=d:\bananas\exceptional.ini

_______
Regards,
deus-ex
User avatar
petermad
Power Member
Power Member
Posts: 14888
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Except for [Configuration] section which cannot be redirected for obvious reasons.
That's not true:
17.05.06 Added: ini section [Configuration] can now also be redirected via RedirectSection= option. The options AlternateUserIni= and UseIniInProgramDir= will always be read from the non-redirected file, though
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Post by *deus-ex »

Yes, i read about that in the forums today. Ok, so i get half of the cookie for my posting beeing partial right. Haps! The other half goes to petermad. Yum, yum! ;)

_______
Regards,
deus-ex
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

So Drudatz should replace in his ini the AlternatUserIni by RedirecSection and remove the "RedirectSetion=!" and all should work like he expects.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Post Reply