Can a script.bat make changes to Windows PATH Environment Variable

后端 未结 1 1444
走了就别回头了
走了就别回头了 2020-12-14 09:51

I\'m trying to write a script that when clicked will add a couple of entries to the PATH Environment variable in Windows, instead of making the changes manually. I see .bat

相关标签:
1条回答
  • 2020-12-14 10:08

    If you wish to change/update the PATH permanently in the environment variable, you can use the SETX command e.g.

    setx path "%PATH%;C:\New Folder" 
    

    For more details information on %PATH% and other variables to access to system folder, refer to http://vlaurie.com/computers2/Articles/environment.htm

    0 讨论(0)
提交回复
热议问题