Archive: envVarName


envVarName
5.3.1 $%envVarName%

Does someone have an example ?


This code display value of PATH environment variable

MessageBox MB_OK "$%PATH%"

it is not a big example :)
kobus


example:
%ProgramFiles% will give you your program files folder.
in this case the same as $PROGRAMFILES
another example:
%Temp%
same as $TEMP


Just emphasising that this is a compile-time reference, not run-time, so $%TEMP% will give the path of your temporary files folder, not that of the person using your installer.


If you e.g. %COMSPEC% on run-time (to get user's command prompt path) use:

ReadEnvStr $R0 "COMSPEC"
; $R0 = e.g. C:\Windows\System32\cmd.exe

-Stu