summaryrefslogtreecommitdiff
path: root/_site/get.ps1
diff options
context:
space:
mode:
authorDESKTOP-RBH716R\Admin2022-07-25 17:09:45 +0000
committerDESKTOP-RBH716R\Admin2022-07-25 17:09:45 +0000
commit7d5241858ec2b9086581c64d66e0d5784ce61030 (patch)
treecf1ae15a092d892707fbe4bd95c88b5ac2902362 /_site/get.ps1
parent11e4fd98988e0fd7f56d45afbec989a2ddcaa260 (diff)
downloadmassgrave.dev-7d5241858ec2b9086581c64d66e0d5784ce61030.zip
Revert "MAS 1.6"
This reverts commit 11e4fd98988e0fd7f56d45afbec989a2ddcaa260.
Diffstat (limited to '_site/get.ps1')
-rw-r--r--_site/get.ps135
1 files changed, 7 insertions, 28 deletions
diff --git a/_site/get.ps1 b/_site/get.ps1
index 838bde1..e31c03c 100644
--- a/_site/get.ps1
+++ b/_site/get.ps1
@@ -1,33 +1,12 @@
-function Exit-Script {
-
- [CmdletBinding()]
- param(
- [Parameter(Position = 0)]
- [int]
- $ExitCode = 0
- )
-
- process {
- if (Test-Path -Path "$env:TEMP\MAS.cmd") {
- Remove-Item -Path "$env:TEMP\MAS.cmd" -Force
- }
-
- exit $ExitCode
- }
-
-}
-
-# Enable TLSv1.2 for compatibility with older clients
$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_AIO.cmd'
+$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"
-try {
- Invoke-WebRequest -Uri $DownloadURL -UseBasicParsing -OutFile "$env:TEMP\MAS.cmd"
-} catch {
- Write-Error $_
- Exit-Script -ExitCode 1
+if($PSVersionTable.PSVersion.Major -lt 3){
+(New-Object System.Net.WebClient).DownloadFile($DownloadUrl, $FilePath)
+}else {
+Invoke-WebRequest -Uri $DownloadURL -UseBasicParsing -OutFile $FilePath
}
-Start-Process -FilePath "$env:TEMP\MAS.cmd" -Wait
-Exit-Script \ No newline at end of file
+Start-Process -FilePath $FilePath \ No newline at end of file