Command: Environment variables (if any) are expanded by TC, otherwise no special processing is applied.
Parameters: Percent sign is a special symbol that encodes lots of custom template values (%P, %N, etc.); to specify the percent itself it has to be doubled; if an environment variable is passed (like %%USERNAME%%), it is not expanded but passed to the program's argument as is (a literal text "%USERNAME%").
However, if you put a EM-command into the Command editbox, this all changes. All the extra parameters you append in that box will be treated by the "Parameters rules", instead of the "Command rules".
Case for reproduction.
1. Create a simple EM command, for example, like this:
Code: Select all
[em_notepad]
button=notepad.exe
cmd=notepad.exe
Code: Select all
TOTALCMD#BAR#DATA
notepad.exe %TEMP%
notepad.exe
-1
Code: Select all
TOTALCMD#BAR#DATA
em_notepad %TEMP%
notepad.exe
-1
Code: Select all
"C:\Windows\System32\notepad.exe" C:\Users\USERNAME\AppData\Local\Temp
Code: Select all
"C:\Windows\System32\notepad.exe" c:\Program Files\TotalCmd\EMP
Note:
This only happens if the Parameters field is empty when you specify a EM command in the Command editbox. If Parameters is not empty, then percent signs in both fields are processed correctly, just as described in the TC help (and as summarized at the top of my post).
Tested in Windows 10, TC 11.03 32- and 64-bit.