Why is the Powershell Environment PATH different to the System Environment PATH?

后端 未结 2 963
情歌与酒
情歌与酒 2021-02-02 07:52

I\'m having this weird situation :

My user\'s and system\'s PATH variable is different than the PATH in powershell.

When I do :

PS C:\\$env:path         


        
2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-02 08:54

    In my case, I installed an app that incorrectly added itself to the PATH by creating a powershell profile that would override $env:PATH and blow out the existing configuration every time I started powershell.

    Check if you have profile at USER\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 and if it's doing anything fishy like setting $env:PATH.

提交回复
热议问题