ghisler(Author) wrote:Environment variables are expanded ONLY in the "Command" field, not in the "Parameters" field. Why? They could collide with internal parameters like %P, %N etc.
That's not quite correct.
There are
internal parameters (such as %P, %N etc.) and the following types of
environment variables:
1. Normal environment variables (predefined by Windows such as %ProgramFiles% or user-defined)
2. Pseudo environment variables of Total Commander (such as %$PERSONAL%)
Total Commander expands
internal parameters only in the "Parameters" field of buttons and start menu items.
Total Commander expands
environment variables in the following places:
1. "Command" field of buttons and start menu items
2. "Start path" field of buttons and start menu items
3. "Icon file" field of buttons
4. cm_editpath field
5. command line
...?
but NOT in the "Parameters" field because for example %P%N could collide with a normal (user-defined) environment variable %P%.
Pseudo and normal env vars are treated equally although (as far as I understand) internal parameters could not collide with pseudo env vars.
I think environment variables really deserve a chapter in the
online help of Total Commander and hyperlinks in the related chapters, first of all in "
Dialog box: Configuration - Change button bar" and "
Dialog box: Change start menu".