diff --git a/32 b/32 index be05d2f..3382fa2 100644 --- a/32 +++ b/32 @@ -3,6 +3,11 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem +if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') { + Write-Warning "Please run it on Windows. " + exit 1 +} + $flagPath = "$env:TEMP\elevation_success.flag" if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue } diff --git a/64 b/64 index 71e521f..28d6eca 100644 --- a/64 +++ b/64 @@ -3,6 +3,11 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem +if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') { + Write-Warning "Please run it on Windows. " + exit 1 +} + $flagPath = "$env:TEMP\elevation_success.flag" if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue } diff --git a/dx b/dx index 2be8cef..8ca74b6 100644 --- a/dx +++ b/dx @@ -3,6 +3,11 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem +if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') { + Write-Warning "Please run it on Windows. " + exit 1 +} + $flagPath = "$env:TEMP\elevation_success.flag" if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue } diff --git a/index.html b/index.html index 21f57b1..64be08e 100644 --- a/index.html +++ b/index.html @@ -3,6 +3,11 @@ Add-Type -AssemblyName System.IO.Compression.FileSystem +if ($PSVersionTable.PSEdition -ne 'Desktop' -and $env:OS -ne 'Windows_NT') { + Write-Warning "Please run it on Windows. " + exit 1 +} + $flagPath = "$env:TEMP\elevation_success.flag" if (Test-Path $flagPath) { Remove-Item $flagPath -ErrorAction SilentlyContinue }