set AddPath=%~dp0
wmic ENVIRONMENT where "name='path' and username='<system>'" set VariableValue="%path%;%AddPath%"
wmic ENVIRONMENT where "name='path' and username='<system>'" set VariableValue="%path%;%AddPath%"
pause
把上面的内容保存为xxx.bat 并以管理员身份运行