Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions assets/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<Publish Dialog="MyExitDialog" Control="Finish" Order="1" Event="DoAction" Value="LaunchApplication">LAUNCHAPPONEXIT</Publish>
</UI>
<!-- Prerequisites -->
<Condition Message="Supported only on Win8 and above">
<Condition Message="Supported only on Windows 7 and above">
<![CDATA[ Installed OR $(var.MinOSVersionSupported) ]]>
</Condition>
<!-- Information About When Older Versions Are Trying To Be Installed-->
Expand All @@ -74,7 +74,7 @@
<ComponentRef Id="ProductVersionFolder"/>
<ComponentRef Id="ApplicationProgramsMenuShortcut"/>
</Feature>
<!--We need to show EULA, and provide option to customize download location-->
<!-- We need to show EULA, and provide option to customize download location -->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<!-- Prerequisite check for Windows Universal C runtime -->
<Property Id="UNIVERSAL_C_RUNTIME_INSTALLED" Secure="yes">
Expand All @@ -84,17 +84,17 @@
</DirectorySearch>
</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://aka.ms/pscore6-prereq">
<![CDATA[Installed OR UNIVERSAL_C_RUNTIME_INSTALLED]]>
</Condition>
<!-- Prerequisite check for Visual Studio 2015 C++ redistributables -->
<Property Id="VISUAL_CPP_RUNTIME_INSTALLED" Secure="yes">
<!-- Prerequisite check for Windows Management Framework -->
<Property Id="PWRSHPLUGIN_VERSION" Secure="yes">
<DirectorySearchRef Id="System32" Parent="WindowsDirectory" Path="System32">
<FileSearch Id="vcruntime140" Name="vcruntime140.dll"/>
<FileSearch Id="pwrshplugin" Name="pwrshplugin.dll" MinVersion="6.3.9600.16383"/>
</DirectorySearchRef>
</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: https://aka.ms/pscore6-prereq">
<![CDATA[Installed OR PWRSHPLUGIN_VERSION ]]>
</Condition>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.ProductProgFilesDir)">
Expand Down
6 changes: 5 additions & 1 deletion docs/installation/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@ There is a shortcut placed in the Start Menu upon installation.

### Prerequisites

To enable PowerShell remoting over WinRM, the following prerequisites need to be met:

* Install the [Universal C Runtime](https://www.microsoft.com/download/details.aspx?id=50410) on Windows versions prior to Windows 10.
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/download/details.aspx?id=40855)
or newer ([5.0](https://www.microsoft.com/download/details.aspx?id=50395),
[5.1](https://www.microsoft.com/download/details.aspx?id=54616)) on Windows 7.

## Deploying on Nano Server

Expand Down
28 changes: 12 additions & 16 deletions test/powershell/Installer/WindowsInstaller.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
$thisTestFolder = Split-Path $MyInvocation.MyCommand.Path -Parent
$wixProductFile = Join-Path $thisTestFolder "..\..\..\assets\Product.wxs"

Describe "Windows Installer" -Tags "Scenario" {

BeforeAll {
$originalDefaultParameterValues = $PSDefaultParameterValues.Clone()
if ( ! $IsWindows ) {
$PSDefaultParameterValues["it:skip"] = $true
}
}

AfterAll {
$global:PSDefaultParameterValues = $originalDefaultParameterValues
$preRequisitesLink = 'https://aka.ms/pscore6-prereq'
$linkCheckTestCases = @(
@{ Name = "Universal C Runtime"; Url = $preRequisitesLink }
@{ Name = "WMF 4.0"; Url = "https://www.microsoft.com/download/details.aspx?id=40855" }
@{ Name = "WMF 5.0"; Url = "https://www.microsoft.com/download/details.aspx?id=50395" }
@{ Name = "WMF 5.1"; Url = "https://www.microsoft.com/download/details.aspx?id=54616" }
)
}

$preRequisitesLink = 'https://github.com/PowerShell/PowerShell/blob/master/docs/installation/windows.md#prerequisites'

It "WiX (Windows Installer XML) file contains pre-requisites link $preRequisitesLink" {
$wixProductFile = Join-Path -Path $PSScriptRoot -ChildPath "..\..\..\assets\Product.wxs"
(Get-Content $wixProductFile -Raw).Contains($preRequisitesLink) | Should Be $true
}

It "Pre-Requisistes link $preRequisitesLink is reachable" -TestCases $downloadLinks -Test {
It "Pre-Requisistes link for '<Name>' is reachable" -TestCases $linkCheckTestCases -Test {
param ($Url)

# Because an outdated link 'https://www.microsoft.com/download/details.aspx?id=504100000' would still return a 200 reponse (due to a redirection to an error page), it only checks that it returns something
(Invoke-WebRequest $preRequisitesLink -UseBasicParsing) | Should Not Be $null
(Invoke-WebRequest $Url -UseBasicParsing) | Should Not Be $null
}

}