修改环境变量
在path变量后添加,对变量长度无限制,需要重启后生效
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
/v Path /t REG_SZ /d "%path%;c:\newpath;whatever" /f
reg save "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" D:\\path.hiv /y
reg export "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" d:\MyReg.REG
reg import c:\myreg.reg
SetX _car_park North /m
SetX aaa "%PATH%;foobar;" /m