%__APPDIR__%
have the path (with a backlash at the end) where the application that request the variable is located.
For example, if we run C:\Windows\system32\cmd.exe , %__APPDIR__% will expand to C:\Windows\system32\
If we copy cmd to C:\dev\cmd.exe and run it %__APPDIR__% will expand to C:\dev\
Code: Select all
Echo %__APPDIR__%
Also I re document the %__CD__%
%__CD__%
have the current directory (with a backlash at the end) of the application that request the variable.
Code: Select all
Echo %__CD__%
Both, really are pseudo environment variables, found in the function RtlQueryEnvironmentVariable_U of windows in ntdll.dll