在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
当变量长度超过1024时,不能用这个SetX _car_park North /m
SetX aaa "%PATH%;foobar;" /m