From 2116b7e568a7d11d4f254e253ca2768bb0c2c5a6 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Thu, 2 Apr 2020 09:45:01 +0200 Subject: [PATCH] Update windows-installer/template.nsi Co-Authored-By: Brad Warren --- windows-installer/template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows-installer/template.nsi b/windows-installer/template.nsi index dd4c251e8..dc153f314 100644 --- a/windows-installer/template.nsi +++ b/windows-installer/template.nsi @@ -20,7 +20,7 @@ SetCompressor lzma Function .onInit ; Check that Powershell is at least 5.0. - nsExec::ExecToStack `powershell -ExecutionPolicy RemoteSigned -Command "Write-Host -NoNewline (Get-Host | Select-Object Version).Version.CompareTo([System.Version]'5.0')"` + nsExec::ExecToStack `powershell -ExecutionPolicy RemoteSigned -Command "Write-Host -NoNewline $$PSVersionTable.PSVersion.Major.CompareTo(5)"` Pop $0 Pop $1 StrCmp $1 "-1" 0 powershellok