Skip to content

Commit 5dd0634

Browse files
authored
Add experimental RFC for changing the MSI install path of PowerShell Core and side-by-side for preview versions (#115)
* add initial draft of RFC for MSI install path * respond to feedback on MSI path RFC * change MSI rfc to use .cmd file for pwsh-preview * add Enable-PSRemoting to preview MSI RFC * fix MSI RFC typos * update front matter
1 parent ff74f35 commit 5dd0634

File tree

1 file changed

+73
-0
lines changed

1 file changed

+73
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
---
2+
RFC: RFC
3+
Author: Joey Aiello
4+
Status: Experimental-Accepted
5+
Version: 0.2
6+
Area: Installation
7+
Comments Due: March 27, 2018
8+
Plan to implement: Yes
9+
---
10+
11+
# MSI Installation Path Location
12+
13+
Today, when using the MSI package on Windows,
14+
PowerShell Core is installed to `$env:ProgramFiles\PowerShell\<version>\`.
15+
This path was chosen early in the development of PowerShell Core in order to provide a deterministic,
16+
file-based way to query the installed version of PowerShell.
17+
In this RFC, we will explore the possibility of installing to different paths in order to support certain side-by-side scenarios.
18+
19+
## Motivation
20+
21+
Now that PowerShell Core 6.0 has GA'd, some users would like to run a preview version of PowerShell Core 6.1 side-by-side with PowerShell Core.
22+
Today, that's only possible if one version is installed via the MSI and another is installed via the "portable" ZIP package.
23+
Unfortunately, this makes the ZIP-installed copy of PowerShell difficult to install.
24+
25+
Also, in working to support Microsoft Update (MU) for servicing of PowerShell Core,
26+
we require that the path of all PowerShell Core binaries does not change between servicing.
27+
For example, if needed to patch a hypothetical version 6.0.3 to 6.0.4, the location of `pwsh.exe` and all associated binaries cannot change.
28+
29+
Lastly, we now have multiple mechanisms for querying the version directly from the PowerShell binary itself.
30+
In order to support *nix-y semantics, we've added a `--version` parameter to `pwsh` that returns the version.
31+
We also provide the version of PowerShell in the FileVersion object associated with `pwsh`.
32+
33+
## Specification
34+
35+
* There shall be two "flavors" of MSIs available:
36+
* Stable: a production-ready, supported build.
37+
* Preview: an unsupported build that may contain incomplete new features and high-impact bugs,
38+
and should therefore not be used in production.
39+
* All stable MSIs of PowerShell Core 6.x shall be installed to `$env:ProgramFiles\PowerShell\6\`.
40+
* All preview MSIs of PowerShell Core 6.x shall be installed to `$env:ProgramFiles\PowerShell\6-Preview`.
41+
* When a stable MSI is run on a machine that already has a stable PowerShell Core 6.x installed,
42+
an in-place update of that stable build shall be performed.
43+
* When a preview MSI is run on a machine that already has a preview PowerShell Core 6.x installed,
44+
an in-place update of that preview build shall be performed.
45+
* No installation of a preview build shall interfere with a stable build, and vice versa
46+
* This includes an implicit requirement that `Install-PowerShellRemoting.ps1`
47+
and `Enable-PSRemoting` create a different endpoint name for the preview build.
48+
* The preview of PowerShell Core 6.x shall not be placed on the `PATH`.
49+
Instead, we should create a subdirectory in `$PSHOME` called `bin`,
50+
create a `pwsh-preview.cmd` file that launches the preview `pwsh.exe`,
51+
and add `$PSHOME\bin` to the `PATH`.
52+
53+
## Alternate Considerations and Proposals
54+
55+
### Include the minor version number in the folder name
56+
57+
This proposal would install/update all stable PowerShell Core 6.x builds to `$env:ProgramFiles\PowerShell\6.0`,
58+
and all stable PowerShell Core 6.1 builds to `$env:ProgramFiles\PowerShell\6.1`.
59+
Similarly, previews of PowerShell Core 6.1 would be installed to `$env:ProgramFiles\PowerShell\6.1-preview`,
60+
and previews of PowerShell Core 6.2 would be installed to `$env:ProgramFiles\PowerShell\6.2-preview`.
61+
62+
This is undesirable given the Modern Lifecycle Policy that PowerShell Core has adopted.
63+
Essentially, we've given users 6 months to migrate off of an older minor version of PowerShell Core once a new one is released.
64+
Therefore, it makes more sense to *update* users from stable 6.0 to 6.1 than leave a version lying around that will soon become unsupported.
65+
If users want to maintain unsupported versions of PowerShell Core side-by-side,
66+
they should do a portable ZIP install.
67+
68+
## Open Questions
69+
70+
* Should an update install of stable PowerShell Core 6.0 to 6.1 also do a cleanup of any remaining preview 6.1 installs on the box?
71+
* I'd posit "no" because the stable vs. preview branches should be independent installations.
72+
E.g. I may want to immediately do an update of my preview 6.1 to 6.2,
73+
and maybe I have profiles or modules in that preview `$PSHOME` that I want specific to my preview install.

0 commit comments

Comments
 (0)