SETX doesn't append path to system path variable

前端 未结 7 1362
悲&欢浪女
悲&欢浪女 2020-12-23 18:49

I have tried below command to append some path to system path variable by batch-file :

setx PATH \"%PATH%;C:\\Program Files\\MySQL\\MySQL Server 5.5\\bin\"
<         


        
7条回答
  •  -上瘾入骨i
    2020-12-23 19:14

    To piggy-back on @Endoro's answer (I lack the rep to comment):

    If you want to change the system-wide environment variables, you have to use /M, a la:

    setx PATH "%PATH%;C:\Program Files\MySQL\MySQL Server 5.5\bin" /M
    

    setx.exe is picky about placement of the /M, BTW. It needs to be at the end.

提交回复
热议问题