开发者

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%%
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜