From e7dd6a1b5486b7a9c72afc3ec3040a75cfdb0bc6 Mon Sep 17 00:00:00 2001 From: Alan Mason <1923621+2Shirt@users.noreply.github.com> Date: Mon, 27 Nov 2017 13:28:31 -0800 Subject: [PATCH] PowerShell 6 on Win7 failed to build Start-Process "" -Wait doesn't wait preventing proper extraction of tools. See these issues: * https://github.com/PowerShell/PowerShell/issues/2091 (Main issue) * https://github.com/PowerShell/PowerShell/issues/3747 * https://github.com/PowerShell/PowerShell/pull/4463 --- .bin/Scripts/build_kit.ps1 | 9 +++++++++ README.md | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.bin/Scripts/build_kit.ps1 b/.bin/Scripts/build_kit.ps1 index 3028a0a2..6d95bfb6 100644 --- a/.bin/Scripts/build_kit.ps1 +++ b/.bin/Scripts/build_kit.ps1 @@ -17,6 +17,15 @@ $host.UI.RawUI.BackgroundColor = "black" $host.UI.RawUI.ForegroundColor = "white" $progressPreference = 'silentlyContinue' +## Safety Check ## +if ($PSVersionTable.PSVersion.Major -eq 6 -and $PSVersionTable.OS -imatch "Windows 6.1") { + Write-Host -ForegroundColor "Red" "`nAborted." + Write-Host "`nThis script doesn't support PowerShell 6.0 on Windows 7." + Write-Host "Press Enter to exit... " -NoNewLine + Read-Host + exit +} + ## Functions ## function download-file { param ([String]$path, [String]$name, [String]$url) diff --git a/README.md b/README.md index 5d81f2f0..b12db904 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A collection of scripts to help technicians service Windows systems. ## Requirements ## -* PowerShell 3.0 or newer +* PowerShell 3.0 or newer1 * 6 Gb disk space ## Initial Setup ## @@ -35,4 +35,7 @@ A collection of scripts to help technicians service Windows systems. * `Installers` * `Misc` * `Repairs` -* `Uninstallers` \ No newline at end of file +* `Uninstallers` + +### Notes ### +1. PowerShell 6.0 on Windows 7 is not supported by the build script. \ No newline at end of file