For command processor CMD.exe this limitation (running from %windir%\system32) can be partially solved by using the special command line:Warning: Programs run as administrator will always start with the program directory as the start path, and environment variables (like %COMMANDER_PATH%) are NOT inherited from Total Commander, only those from the system.
Code: Select all
%comspec% /k cd /d %userprofile%
I suppose that a special internal variable, resolved on-the-fly by TC before sending the command line to OS, could solve this problem completely.
Imagine, TC can define the internal variable, say, %COMMANDER_CURDIR% and we use it in the command line for CMD button:
Code: Select all
%comspec% /k cd /d %COMMANDER_CURDIR%
Of course, this will work in user mode as well, like it is already implemented in TC by default.