Questions about RedirectSection for Hotlist

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Questions about RedirectSection for Hotlist

Post by *JnLLnd »

Hi,

I know I could find answers to my questions by doing try and error. But if one could save me some time and answer these questions, I would appreciate.

Ghisler wrote here some time ago that:
RedirectSection only works in wincmd.ini, not in the redirected files
Is it still the case in current version, especially for the [DirMenu] section? I understand RedirectSection cannot be recursive?

If the redirected filename does not include a path, does the redirected file must be in the same folder as wincmd.ini? Or same as the TC working directory (in AppData)? Or same TC executable file?

I read that env variables are supported. Are relative path also supported? For example, "..\this_or_that\hotlist.ini".

Can WinCmd.ini include a mix of items + redirections, for example:

[DirMenu]
menu1=CONTROL &PANEL
cmd1=cm_OpenControls
RedirectSection=hotlist.ini
menu2=&DESKTOP
cmd2=cm_OpenDesktop
...

If yes, would items in hotlist.ini must start over at #1 (menu1= ...)?

Finally, I assume the data format in redirected files is the same as in WinCmd.ini. Correct?

I need to know this to improve TC support in Quick Access Popup following a TC user new to QAP. Currently, Hotlist items can be shown in QAP menu but only for items saved directly in WinCmd.ini. I want QAP to also support redirection.

Thanks for your help,

Jean
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I understand RedirectSection cannot be recursive?
Yes, only wincmd.ini can redirect, redirection is not recursive.
If the redirected filename does not include a path, does the redirected file must be in the same folder as wincmd.ini?
Redirected file w/o path must be near wincmd.ini, it is easy to check using TOTALCMD.exe /I=file.ini.
I read that env variables are supported. Are relative path also supported? For example, "..\this_or_that\hotlist.ini".
It may also be checked easilly, and it seems that relative paths are not supported, though you can use something like %COMMANDER_INI%\..\..\this_or_that\hotlist.ini as a workaround.
Can WinCmd.ini include a mix of items + redirections, for example:
No, only entire section may be redirected, if section is redirected, its contents in wincmd.ini is ignored.
Finally, I assume the data format in redirected files is the same as in WinCmd.ini. Correct?
Yes, you can simply cut section from wincmd.ini.
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

Great answers, MVV. Thanks.

I'm ready with this to complete hotlist parsing in QAP. I will let you know when this is done.

Jean
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
batchman61
Junior Member
Junior Member
Posts: 43
Joined: 2003-02-07, 19:24 UTC
Location: Germany

Post by *batchman61 »

Hi,

simple workaround is to configure WinCmd.ini location in QAP to the ini file containing the redirected [DirMenu] section. Works without any issues here.
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

Yes. Why not! Thanks batchman61 :-)
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

JnLLnd,
If you support RedirectSection parameter in [DirMenu] section, you should also support AlternateUserIni parameter in [Configuration] section.
User avatar
JnLLnd
Junior Member
Junior Member
Posts: 53
Joined: 2014-10-01, 12:14 UTC
Location: Montreal, Canada
Contact:

Post by *JnLLnd »

MVV wrote:JnLLnd,
If you support RedirectSection parameter in [DirMenu] section, you should also support AlternateUserIni parameter in [Configuration] section.
Yes. Good point, got it. Thanks.
TC Doc wrote:AlternateUserIni=<somename.ini>
If present, it will redirect storing of all user-changeable sections to an alternate ini file (in this example, somename.ini), except for the following sections: [Configuration], [Layout], [Packer], [Confirmation], [Extensions], [Associations], [Shortcuts], [ShortcutsWin], [PackerPlugins], [FileSystemPlugins], [ListerPlugins], [ContentPlugins]. These sections can be redirected individually, though:
In each section, an entry RedirectSection= can be added to change the default behaviour. It will allow to redirect (or not) this section to another ini file: Possible values:
0: no redirect
1: redirect to ini file defined via AlternateUserIni=<alternate ini file.ini>
<ininame.ini>: redirect to that specific ini
Author of the TC compatible freeware Quick Access Popup
QAP: http://www.quickaccesspopup.com
Other apps: http://code.jeanlalonde.ca
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please be aware that wincmd.ini and the redirected ini don't need to use the same encoding. My wincmd.ini is ANSI, while my redirected ini is Unicode UTF-16. Only two two encodings are supported by Windows ini functions.
Author of Total Commander
https://www.ghisler.com
Post Reply