how to escape % at cmd setx?
I'm trying to set var by cmd script, but got some problem,
setx /M JAVA_HOME "D:\Tool\JDK"
setx /M PATH "%PATH%;%开发者_运维技巧JAVA_HOME%\bin;D:\TZProfile\!!!QuickLink\"
I want to add %JAVA_HOME%\bin to PATH, no "D:\Tool\JDK"
On commandline use ^
to escape, like so
^%JAVA_HOME^%
In batch file, use %
to escape, like so
%%JAVA_HOME%%
精彩评论