Powershell: 7.0 preview installer is setting the wrong path for the PATH environment variable. (on Windows)

Created on 31 May 2019  路  5Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

Install the Powershell 7.0 Preview 1 on Windows. (install with defaults)

Expected behavior

PATH should have C:\Program Files\PowerShell\7-preview\

Actual behavior

PATH contains C:\Program Files\PowerShell\7-preview\preview

Here's the path after running installing it in Sandbox (saw the same issue on my devbox)
image

Area-Maintainers-Build Issue-Question OS-Windows Resolution-Answered

Most helpful comment

I can confirm this is still an issue in 7.0.0-preview.6 @iSazonov

All 5 comments

@bergmeister Can you confirm the issue?

I can confirm this is still an issue in 7.0.0-preview.6 @iSazonov

/cc @SteveL-MSFT Have we the issue in release branch?

This is actually intended as the pwsh-preview.cmd batch file resides there while the real pwsh.exe is in the parent folder. By changing the path to the parent, pwsh will start the last one instead of always the stable one.

This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.

Was this page helpful?
0 / 5 - 0 ratings