
Can someone help me write a em command to add the selected folder to the path environment variable?
Moderators: Hacker, petermad, Stefan2, white
Re: Can someone help me write a em command to add the selected folder to the path environment variable?
Code: Select all
[em_addtopath]
cmd=%COMSPEC% /C
param=path %%PATH%%;%P%N
This em_command will add the folder under the cursor to the path env. and start a new instance of TC that uses that path setting.
Code: Select all
[em_addtopath_innewtc]
cmd=%COMSPEC% /C
param=path %%PATH%%;%P%N && %X start "" "%%COMMANDER_EXE%%" /N /P /A /i="%%COMMANDER_INI%%" %P%N* %T%M*
Code: Select all
[em_addpatc_restarttc]
cmd=em_addtopath_innewtc, cm_Exit
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Can someone help me write a em command to add the selected folder to the path environment variable?
What is your goal ?
Do you want to edit global path, user path ?
If you want to keep your change for next time use setx command.
For global path, you will have to use the SETX comnand as admin :
For user path just use setx command without compsec nor admin:
If you need to refresh environment in an opened console, you can use refreshenv script.
Do you want to edit global path, user path ?
If you want to keep your change for next time use setx command.
For global path, you will have to use the SETX comnand as admin :
Code: Select all
TOTALCMD#BAR#DATA
*%comspec% /C
setx /m PATH "%P;%%PATH%%"
wcmicons.dll,34
-1
Code: Select all
TOTALCMD#BAR#DATA
setx
/m PATH "%P;%%PATH%%"
wcmicons.dll,34
-1