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
24 changes: 24 additions & 0 deletions assets/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,30 @@

<!--We need to show EULA, and provide option to customize download location-->
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />

<!-- Prerequisites check for Windows Universal C time and Visual Studio 2015 C++ redistributables -->
<Property Id="UCRTINSTALLED" Secure="yes">
<DirectorySearch Id="Windows_System32" Path="[WindowsFolder]System32" Depth="0">
<FileSearch Name="ucrtbase.dll"/>
</DirectorySearch>
</Property>
<Property Id="VCREDISTINSTALLEDX64" Secure="yes">
<RegistrySearch Id="VCRedist_RegSearch_x64" Root="HKLM" Name="Version" Type="raw" Win64="yes"
Key="SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum"/>
</Property>
<Property Id="VCREDISTINSTALLEDX86" Secure="yes">
<RegistrySearch Id="VCRedist_RegSearch_x86" Root="HKLM" Name="Version" Type="raw" Win64="no"
Key="SOFTWARE\Microsoft\DevDiv\VC\Servicing\14.0\RuntimeMinimum"/>
</Property>
<Condition Message="$(env.ProductName) requires the Universal C Runtime to be installed. You can download it here: https://www.microsoft.com/download/details.aspx?id=50410">
<![CDATA[Installed OR UCRTINSTALLED]]>
</Condition>
<Condition Message="$(env.ProductName) requires the Visual Studio C++ 2015 x64 redistributables to be installed. You can download it here: https://www.microsoft.com/download/details.aspx?id=48145">
<![CDATA[Installed OR ("$(var.ProductTargetArchitecture)" = "x64" AND VCREDISTINSTALLEDX64 AND VCREDISTINSTALLEDX64 >= "14.0.23918")]]>
</Condition>
<Condition Message="$(env.ProductName) requires the Visual Studio C++ 2015 x86 redistributables to be installed. You can download it here: https://www.microsoft.com/download/details.aspx?id=48145">
<![CDATA[Installed OR (VCREDISTINSTALLEDX86 AND VCREDISTINSTALLEDX86 >= "14.0.23918")]]>
</Condition>

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.ProductProgFilesDir)">
Expand Down
6 changes: 3 additions & 3 deletions docs/installation/windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ There is a shortcut placed in the Start Menu upon installation.

### Prerequisites

* Install the [Universal C Runtime](https://www.microsoft.com/en-us/download/details.aspx?id=50410) on Windows versions prior to Windows 10.
* 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://my.visualstudio.com/Downloads?pid=2082) for VS2015.
* Install the [Visual C++ Redistributable](https://www.microsoft.com/download/details.aspx?id=48145) for VS2015.

## Deploying on Nano Server

These instructions assume that Windows PowerShell is running on the Nano Server image and that it has been generated by the [Nano Server Image Builder](https://technet.microsoft.com/en-us/windows-server-docs/get-started/deploy-nano-server).
These instructions assume that Windows PowerShell is running on the Nano Server image and that it has been generated by the [Nano Server Image Builder](https://technet.microsoft.com/windows-server-docs/get-started/deploy-nano-server).
Nano Server is a "headless" OS and deployment of PowerShell Core binaries can happen in two different ways:

1. Offline - Mount the Nano Server VHD and unzip the contents of the zip file to your chosen location within the mounted image.
Expand Down
26 changes: 26 additions & 0 deletions test/powershell/Installer/WindowsInstaller.Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$thisTestFolder = Split-Path $MyInvocation.MyCommand.Path -Parent
$wixProductFile = Join-Path $thisTestFolder "..\..\..\assets\Product.wxs"

Describe "Windows Installer" -Tags "Scenario" {

Context "Universal C Runtime Download Link" {
$universalCRuntimeDownloadLink = 'https://www.microsoft.com/download/details.aspx?id=50410'
It "Wix file should have download link about Universal C runtime" {
(Get-Content $wixProductFile -Raw).Contains($universalCRuntimeDownloadLink) | Should Be $true
}
It "Should have download link about Universal C runtime that is reachable" {
(Invoke-WebRequest $universalCRuntimeDownloadLink.Replace("https://",'http://')) | Should Not Be $null
}
}

Context "Visual Studio C++ Redistributables Link" {
$visualStudioCPlusPlusRedistributablesDownloadLink = 'https://www.microsoft.com/download/details.aspx?id=48145'
It "WiX file should have documentation about Visual Studio C++ redistributables" {
(Get-Content $wixProductFile -Raw).Contains($visualStudioCPlusPlusRedistributablesDownloadLink) | Should Be $true
}
It "Should have download link about Universal C runtime that is reachable" {
(Invoke-WebRequest $visualStudioCPlusPlusRedistributablesDownloadLink.Replace("https://",'http://')) | Should Not Be $null
}
}

}