Skip to content

Eliminate version number from install path #6319

@gradinkov

Description

@gradinkov

It is very difficult to provide users with instructions if the framework that we use changes its path everytime an update is released. Using powershell programs usually involves instructing users to create a shortcut like:

pwsh.exe -Command C:\path\to\script.ps1

But this is implicit and only works if PS6 is the first pwsh in PATH. Or we could use full path:

C:\Program Files\PowerShell\6.0.1\pwsh.exe -Command C:\path\to\script.ps1

which works, until the user installs the 6.0.2 update. It is unreasonable to update all shortcuts because of this. Besides, there's really no point in having the exact version in the install path. This information does not belong there. The major version kinda makes sense, but major.minor.micro? And I gotta explain this all everytime to the users. It's pointless.

The only other software that does this is Java, which

  • is also a PITA exactly because of this
  • at least sets the JAVA_HOME envvar so that we can detect this

With PowerShell there's not too many ways to detect the installed version, especially in a way that works for a shortcut.

Please, consider using %PROGRAMFILES%\PowerShell or at least %PROGRAMFILES%\PowerShell\major instead of %PROGRAMFILES%\PowerShell\major.minor.micro.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions