Additional TC environment variable

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Additional TC environment variable

Post by *EricB »

Since I'm using TC in portable mode and junctions are not working when IE10 is installed, (see topic www.ghisler.ch/board/viewtopic.php#265295) I'd like to request a new TC environment variable %commander_tools%, meant for indicating a general tools folder outside %commander_path%. This would eliminate the use of a junction completely.
By using the variable in stead of a hard path, it is e.g. possible to have tool items on the button bar without having to adapt TB paths for every system.

Regards, EricB
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Junctions will work again in TC 8.5 with IE10 installed - TC just needs to follow the junction because Windows is no longer able to do it in ShellExecuteEx.
Author of Total Commander
https://www.ghisler.com
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Christian,

Regardless if junctions work or not, for portable use it is extremely handy to be able to use an environment variable from within TC.
Use case is portable TC8 and Tools folders inside Dropbox, which can be transferred to the root of a USB stick. Using the environment variable %COMMANDER_TOOLS% (surely when putting %COMMANDER_DRIVE% inside that variable), no paths have to be adapted for button bar items or directory hotlist items.

Regards, EricB
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50873
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Actually the latest build 16618 of IE10 seems to fix this error! It was in Windows update since yesterday.
Author of Total Commander
https://www.ghisler.com
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Yes, I already reported the fix as working yesterday in the other thread http://ghisler.ch/board/viewtopic.php?p=266093#266093.

Still I would highly appreciate an additional variable for reasons mentioned in my previous post.

Regards, EricB
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can use Autorun.wdx plugin to define such variable.
User avatar
Stefan2
Power Member
Power Member
Posts: 4281
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Post by *Stefan2 »

%COMMANDER_TOOLS% ??? For what???

%COMMANDER_Path% should be enough, isn't it?


You can even use it relative like
%COMMANDER_Path%\..\MyTools


Or use
%COMMANDER_DRIVE%\MyTools



Or you can launch TC from a batch
and SET COMMANDER_TOOLS yourself,
maybe by utilizing %CD% or %~dp0



 
Last edited by Stefan2 on 2013-06-13, 13:16 UTC, edited 1 time in total.
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Hi MVV,

I just found out about Autorun.wdx; I would prefer a 'native' solution (no other dependencies), but meanwhile I'm going to use this.

Regards, EricB
User avatar
EricB
Senior Member
Senior Member
Posts: 357
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Hi Stefan2,

The situation:

Folders d:\Dropbox\TC8 and d:\Dropbox\Tools; all fully portable.

When I copy those folders to my USB stick I rather have those in the root x:\TC8 and x:\Tools

Any reference from the buttonbar to a tool in the tools folder (or deeper subfolder) is not valid anymore, UNLESS I make junctions d:\tools and d:\tc8 and refer from there. Only then the use of %COMMANDER_DRIVE% is going to work. This was impossible for some time due to the mentioned IE10 bug (which is fortunately now fixed).

Of course I can use relative paths, but as you can see those would become quite lengthy, therefore my request. For now I can use autorun.wdx to define my %commander_tools% as %commander_drive%\Tools (or even better: %commander_path%\..\Tools). This way I only have to change path definition in one single place to ensure portability.

I hope this all makes sense?

Regards, EricB
Post Reply