bat设置环境变量

wmic ENVIRONMENT create name="JAVA_HOME",username="<system>",VariableValue="C:\JAVA"
原文地址:https://www.cnblogs.com/yesun/p/1348193.html