use psversiontable

This commit is contained in:
Brad Warren 2020-04-01 16:57:54 -07:00
parent ea6ce639d2
commit ca33a67e58

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