mirror of
https://github.com/msvc-win/get.msvc.win.git
synced 2025-12-16 05:07:39 +00:00
Disable the script from running on non-Windows
This commit is contained in:
parent
1e05e3ee4a
commit
4ada8f2fde
4 changed files with 20 additions and 0 deletions
5
dx
5
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 }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue