-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix the prerequisite check of MSI package #5070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
assets/Product.wxs
Outdated
| </DirectorySearch> | ||
| </Property> | ||
| <Condition Message="$(env.ProductName) requires the Universal C Runtime to be installed. You can find a download link to it here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites"> | ||
| <Condition Message="$(env.ProductName) requires the Universal C Runtime to be installed to enable remoting over WinRM. You can find a download link to it here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That URL is too long. I created this you can use: http://aka.ms/pscore6-prereq
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much better 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
assets/Product.wxs
Outdated
| </Property> | ||
| <Condition Message="$(env.ProductName) requires the Visual Studio 2015 C++ redistributables to be installed. You can find a download link to it here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites"> | ||
| <![CDATA[Installed OR VISUAL_CPP_RUNTIME_INSTALLED]]> | ||
| <Condition Message="$(env.ProductName) requires the Windows Management Framework 4.0 or above to be installed to enable remoting over WinRM. You can find download links here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this URL as well: http://aka.ms/pscore6-prereq
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
docs/installation/windows.md
Outdated
| Fully patched (including optional packages), supported systems will already have this installed. | ||
| * Install the [Visual C++ Redistributable](https://www.microsoft.com/download/details.aspx?id=48145) for VS2015. | ||
| * Install the Windows Management Framework (WMF) [4.0](https://www.microsoft.com/en-us/download/details.aspx?id=40855) | ||
| or above ([5.0](https://www.microsoft.com/en-us/download/details.aspx?id=50395), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change "above" to "newer"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
assets/Product.wxs
Outdated
| </Property> | ||
| <Condition Message="$(env.ProductName) requires the Visual Studio 2015 C++ redistributables to be installed. You can find a download link to it here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites"> | ||
| <![CDATA[Installed OR VISUAL_CPP_RUNTIME_INSTALLED]]> | ||
| <Condition Message="$(env.ProductName) requires the Windows Management Framework 4.0 or newer to be installed to enable remoting over WinRM. You can find download links here: http://aka.ms/pscore6-prereq"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if this check should be a notification during installation rather than a requirement. There is a strong desire from a few folks to have PowerShell Core installable on Win 7 SP1 without requiring a WMF installation. The point is to make PowerShell Core usable on those systems without requiring a reboot.
The open questions I have on this topic are:
- To what extent does PowerShell Core function on Win 7 SP1 without WMF 4.0+?
- Does outgoing remoting function without WMF 4.0 and UCRT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if people want to use powershell regardless of the prerequisites, then the zip package is the way to go -- no precheck. For msi package, it might be better to ensure everything works.
Those two are good open questions.
For UCRT, not sure if WMI/MI.NET would also depend on it.
For WMF 4.0, it's definitely required for making powershell core connectable as server side, but need to see if outgoing remoting needs it on win7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm on the side that the MSI should be comprehensive and the zip for advanced deployments (users knows what they are doing). I think if we get a bunch of customer feedback on the pre-req, we can revisit this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For UCRT, not sure if WMI/MI.NET would also depend on it.
I tried on Win8.1 and Win2012R2 that don't have UCRT installed, CIM cmdlets seem working fine. So it looks to me that UCRT is only required by pwrshplugin.dll.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, thanks for checking. If outgoing remoting works on Win 7 SP1 without WMF 4.0, then my concerns are covered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Does outgoing remoting function without WMF 4.0 and UCRT?
UCRT is not required for outgoing remoting connection. I'm able to create a session in PowerShell core from a Win81 box without UCRT to another Win81 using the configuration created on the latter Win81.
However, it seems WMF 4 is required for outgoing connection. PowerShell core crashed when I tried to create a session from a Win7 box with PSv2 to a Win7 with WMF 5.1 using the configuration created on the latter Win7:
|
Interesting, can an user copy the link we show on error window? Can we do the link clickable? |
|
@iSazonov unfortunately, the text the installer displays is not clickable or copyable. Will have to research wix to figure out how to have a custom window that has a clickable link. |
|
@iSazonov it's good that we are now using the short URL "http://aka.ms/pscore6-prereq". It mitigates the problem to some extent. |
|
Can we use http://www.installsite.org/pages/en/msi/articles/careful-with-that-hyperlink-on-your-msi-dialog/index.htm ? |
|
Perhaps we should accept this PR as-is (barring any other concerns) and have a new PR/issue for the custom hyperlink control? |
|
We can not rush to the next Beta.9 release. |
assets/Product.wxs
Outdated
| </DirectorySearch> | ||
| </Property> | ||
| <Condition Message="$(env.ProductName) requires the Universal C Runtime to be installed. You can find a download link to it here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites"> | ||
| <Condition Message="$(env.ProductName) requires the Universal C Runtime to be installed to enable remoting over WinRM. You can find a download link to it here: http://aka.ms/pscore6-prereq"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daxian-dbw You also need to add or modify the link in the installer test here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, will fix.
assets/Product.wxs
Outdated
| </Property> | ||
| <Condition Message="$(env.ProductName) requires the Visual Studio 2015 C++ redistributables to be installed. You can find a download link to it here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites"> | ||
| <![CDATA[Installed OR VISUAL_CPP_RUNTIME_INSTALLED]]> | ||
| <Condition Message="$(env.ProductName) requires the Windows Management Framework 4.0 or newer to be installed to enable remoting over WinRM. You can find download links here: http://aka.ms/pscore6-prereq"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
assets/Product.wxs
Outdated
| </DirectorySearch> | ||
| </Property> | ||
| <Condition Message="$(env.ProductName) requires the Universal C Runtime to be installed. You can find a download link to it here: https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites"> | ||
| <Condition Message="$(env.ProductName) requires the Universal C Runtime to be installed to enable remoting over WinRM. You can find a download link to it here: http://aka.ms/pscore6-prereq"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@daxian-dbw You also need to add or modify the link in the installer test here
|
As far as I have seen the message dialog does not allow hyperlinks but the WiX Cookbook gives examples on how to deal with hyperlinks in chapter 11: One could add a custom action that opens the browser if the installation failed due to the pre-requisite check or embed the hyperlink in a custom WiX exit dialogue in case of failure. |
|
@adityapatwardhan and @bergmeister Thanks for your feedback and I have addressed them. Please take another look. |
adityapatwardhan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
assets/Product.wxs
Outdated
| </UI> | ||
| <!-- Prerequisites --> | ||
| <Condition Message="Supported only on Win8 and above"> | ||
| <Condition Message="Supported only on Win7 and above"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very minor but should we maybe spell out Win7 completely as Windows 7 and add a full stop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should spell it out completely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
docs/installation/windows.md
Outdated
| It is available via direct download or Windows Update. | ||
| Fully patched (including optional packages), supported systems will already have this installed. | ||
| * Install the [Visual C++ Redistributable](https://www.microsoft.com/download/details.aspx?id=48145) for VS2015. | ||
| * Install the Windows Management Framework (WMF) [4.0](https://www.microsoft.com/en-us/download/details.aspx?id=40855) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The links should not contain the culture/language specific part en-us
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed.
|
@daxian-dbw Should we also add the new WMF download URLS to the installer tests as their purpose is simply to check that links are still working? |
|
@daxian-dbw Please use |
|
@bergmeister new tests are added to verify the WMF download URLs |
|
LGTM |

Fix #5029
The Fix
Visual C++ Redistributablepwrshplugin.dllhas the following dependencies. All theapi-ms-win-crt-*api sets are part of theUniversal C Runtime. The plugin DLL doesn't depend onVisual C++ Redistributable.On Win7, WMF 4.0 or higher version needs to be installed so that the WinRM can support the side-by-side remoting plugin. So I make the WMF 4.0 a prerequisite too.
The way to check PSv4 or above is to check the file version of
\windows\system32\pwrshplugin.dll. The file version for in-box PSv4 is6.3.9600.16384, for WMF 4.0 is6.3.9600.16406, and for PSv5+ is10.0.xxx. So we can check the MinVersion of the filepwrshplugin.dllto be6.3.9600.16383(means the version needs to be at least6.3.9600.16384).I have verified that on 2012R2, Win8.1 and Win7 once
Universal C Runtimeis installed (it requires a lot of other KB's to be installed) and PSv4 or WMF 4 is available, PowerShell remoting works.Screenshot Examples
On a machine that doesn't have

Universal C Runtimeinstalled:On Win7 that has

Universal C Runtimeinstalled but no WMF 4 or above