SETX doesn't append path to system path variable

前端 未结 7 1381
悲&欢浪女
悲&欢浪女 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条回答
  •  盖世英雄少女心
    2020-12-23 19:12

    I faced the same problem when i tried to add path variables related to fortran (Eclipse for c/c++/fortran)

    I tried SETX /M Path "%PATH%;C:\Users\mahidhai\cygwin64\bin" in command prompt as administrator .I got warning saying data was truncated to 1024 characters and stored .

    SOlution: Go to registry file directly. Run->regedit Navigate to Environment

    (Entire path : HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment )

    Click on path registry and add the path variable directly. Or remove any repeated path variables .

    Now , open command prompt and then run the same command setx /M path "%path%, "

    Path variable could be related to C or C++ or fortran

    No worries in editing registry file , it will be saved permanently , don't be afraid as environment variables are in session manager.

提交回复
热议问题