Use of Environment Variables in wincmd.ini

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
WR
New Member
New Member
Posts: 1
Joined: 2013-05-30, 20:54 UTC

Use of Environment Variables in wincmd.ini

Post by *WR »

Hi all,

I'm new to TC, so apologies if this is old material, but:

I am trying to set up a generic wincmd.ini that uses an environment variable to set the default location for one of the directory panes when TC opens.

In particular, I want to use %USERPROFILE% to open up the user's profile directory in the right pane when TC is launched.

I have tried this entry in the wincmd.ini file but to no avail:

[right]
path=%USERPROFILE%

and alternately

[right]
path=%$USERPROFILE%

But neither work. Actually I can't seem to get any Windows environment variable to work in this context.

Any suggestions/info?

Thanks!
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

TC writes the current path/tabs on exit so you have to edit the wincmd.ini while it's closed.

A safer and more permanent way is to use command line parameters.
See Help -> 4a Command line parameters

eg

Code: Select all

totalcmd.exe /L=%USERPROFILE%
Last edited by ZoSTeR on 2013-05-31, 11:18 UTC, edited 1 time in total.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You can try this plugin, it allows to execute different actions (e.g. change directories) on TC start, just install it correctly and add following line to its configuration file:

Code: Select all

CommandExec /CD "%USERPROFILE%"
Last edited by MVV on 2013-05-31, 12:13 UTC, edited 1 time in total.
User avatar
ZoSTeR
Power Member
Power Member
Posts: 1052
Joined: 2004-07-29, 11:00 UTC

Post by *ZoSTeR »

Don't you mean Autorun? Your link points to F4Menu.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Sorry, of course. I tried to get link to topic from link to post and haven't checked it. Fixed.
Post Reply