I can't figure out how to write "%PROGRAMFILES%" literally to a file using Windows Command Prompt.
What I've tried:
C:\Users\lxvs> echo "%PROGRAMFILES%" > test
C:\Users\lxvs> type test
"C:\Program Files"
C:\Users\lxvs> echo ^%PROGRAMFILES^% > test
C:\Users\lxvs> type test
%PROGRAMFILES%
C:\Users\lxvs> echo "^%PROGRAMFILES^%" > test
C:\Users\lxvs> type test
"^%PROGRAMFILES^%"
C:\Users\lxvs> echo "%%PROGRAMFILES%%" > test
C:\Users\lxvs> type test
"%C:\Program Files%"
Is there a way to approach it?