Page 1 of 1

Additional TC environment variable

Posted: 2013-06-10, 09:19 UTC
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

Posted: 2013-06-10, 14:44 UTC
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.

Posted: 2013-06-13, 09:13 UTC
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

Posted: 2013-06-13, 12:42 UTC
by ghisler(Author)
Actually the latest build 16618 of IE10 seems to fix this error! It was in Windows update since yesterday.

Posted: 2013-06-13, 12:47 UTC
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

Posted: 2013-06-13, 13:12 UTC
by MVV
You can use Autorun.wdx plugin to define such variable.

Posted: 2013-06-13, 13:14 UTC
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



 

Posted: 2013-06-13, 13:14 UTC
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

Posted: 2013-06-13, 13:36 UTC
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