Update windows-installer/template.nsi

Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
This commit is contained in:
Adrien Ferrand 2020-04-02 09:45:01 +02:00 committed by GitHub
parent 2d11d3d8bf
commit 2116b7e568
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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