Adding a directory to the PATH environment variable in Windows

前端 未结 18 1347
我在风中等你
我在风中等你 2020-11-21 05:13

I am trying to add C:\\xampp\\php to my system PATH environment variable in Windows.

I have already added it using the Environment Varia

18条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-21 06:05

    Handy if you are already in the directory you want to add to PATH:

    set PATH=%PATH%;%CD%
    

    It works with the standard Windows cmd, but not in PowerShell.

    For PowerShell, the %CD% equivalent is [System.Environment]::CurrentDirectory.

提交回复
热议问题