diff options
| author | WindowsAddict | 2022-05-20 15:37:29 +0000 |
|---|---|---|
| committer | WindowsAddict | 2022-05-20 15:37:29 +0000 |
| commit | 26dab843a13a66fb7b0946bc57c4ce674e24b099 (patch) | |
| tree | b988ebc0a03ed4915f3740d030ce791903438bab | |
| parent | d09e36af41b54509aefd43347f5f0c8cc3ff9832 (diff) | |
| download | massgrave.dev-26dab843a13a66fb7b0946bc57c4ce674e24b099.zip | |
Test update
| -rw-r--r-- | get-mas.ps1 | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/get-mas.ps1 b/get-mas.ps1 index ebc051a..140cfd4 100644 --- a/get-mas.ps1 +++ b/get-mas.ps1 @@ -1,34 +1,7 @@ -function Exit-Script { +$Tls12 = [Enum]::ToObject([System.Net.SecurityProtocolType], 3072); [System.Net.ServicePointManager]::SecurityProtocol = $Tls12; +$DownloadUrl = 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/master/MAS/All-In-One-Version/MAS_1.5_AIO_CRC32_21D20776.cmd' +$FilePath = "$env:USERPROFILE\Desktop\MAS_1.5_AIO_CRC32_21D20776.cmd" - [CmdletBinding()] - param( - [Parameter(Position = 0)] - [int] - $ExitCode = 0 - ) +(New-Object System.Net.WebClient).DownloadFile($DownloadUrl, $FilePath) - process { - if (Test-Path -Path "$env:TEMP\MAS.cmd") { - Remove-Item -Path "$env:TEMP\MAS.cmd" -Force - } - - exit $ExitCode - } - -} - -# Enable TLSv1.2 and TLSv1.3 for compatibility with older clients -$TLS12Protocol = [System.Net.SecurityProtocolType] 'Tls12', 'Tls13' -[System.Net.ServicePointManager]::SecurityProtocol = $TLS12Protocol - -$DownloadURL = 'https://raw.githubusercontent.com/massgravel/Microsoft-Activation-Scripts/master/MAS/All-In-One-Version/MAS_1.5_AIO_CRC32_21D20776.cmd' - -try { - Invoke-WebRequest -Uri $DownloadURL -UseBasicParsing -OutFile "$env:TEMP\MAS.cmd" -} catch { - Write-Error $_ - Exit-Script -ExitCode 1 -} - -Start-Process -FilePath "$env:TEMP\MAS.cmd" -Wait -Exit-Script +Start-Process -FilePath $FilePath
\ No newline at end of file |
