Update print info, different progress bar, and add -verb runas
This commit is contained in:
12
index.html
12
index.html
@@ -1,9 +1,8 @@
|
|||||||
# This script is hosted on <b>https://get.activated.win</b> for <b>https://massgrave.dev</b><hr><pre>
|
# This script is hosted on <b>https://get.activated.win</b> for <b>https://massgrave.dev</b><hr><pre>
|
||||||
|
|
||||||
if (-not $args) {
|
if (-not $args) {
|
||||||
Write-Host 'Homepage:' -ForegroundColor White -BackgroundColor DarkGreen -NoNewline
|
Write-Host 'Need help? Check our homepage: ' -NoNewline
|
||||||
Write-Host ' ' -NoNewline
|
Write-Host 'https://massgrave.dev' -ForegroundColor Green
|
||||||
Write-Host 'https://massgrave.dev' -ForegroundColor White -BackgroundColor Blue
|
|
||||||
}
|
}
|
||||||
|
|
||||||
& {
|
& {
|
||||||
@@ -54,12 +53,12 @@ if (-not $args) {
|
|||||||
'https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&versionType=Commit&version=67abcd0c8925832fcf4365b9cf3706ab6fbf8571',
|
'https://dev.azure.com/massgrave/Microsoft-Activation-Scripts/_apis/git/repositories/Microsoft-Activation-Scripts/items?path=/MAS/All-In-One-Version-KL/MAS_AIO.cmd&versionType=Commit&version=67abcd0c8925832fcf4365b9cf3706ab6fbf8571',
|
||||||
'https://git.activated.win/massgrave/Microsoft-Activation-Scripts/raw/commit/67abcd0c8925832fcf4365b9cf3706ab6fbf8571/MAS/All-In-One-Version-KL/MAS_AIO.cmd'
|
'https://git.activated.win/massgrave/Microsoft-Activation-Scripts/raw/commit/67abcd0c8925832fcf4365b9cf3706ab6fbf8571/MAS/All-In-One-Version-KL/MAS_AIO.cmd'
|
||||||
)
|
)
|
||||||
|
Write-Progress -Activity "Downloading..." -Status "Please wait"
|
||||||
$errors = @()
|
$errors = @()
|
||||||
foreach ($URL in $URLs | Sort-Object { Get-Random }) {
|
foreach ($URL in $URLs | Sort-Object { Get-Random }) {
|
||||||
try {
|
try {
|
||||||
if ($psv -ge 3) {
|
if ($psv -ge 3) {
|
||||||
$response = Invoke-WebRequest -Uri $URL -UseBasicParsing
|
$response = Invoke-RestMethod $URL
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$w = New-Object Net.WebClient
|
$w = New-Object Net.WebClient
|
||||||
@@ -71,6 +70,7 @@ if (-not $args) {
|
|||||||
$errors += $_
|
$errors += $_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Write-Progress -Activity "Downloading..." -Completed
|
||||||
|
|
||||||
if (-not $response) {
|
if (-not $response) {
|
||||||
Check3rdAV
|
Check3rdAV
|
||||||
@@ -116,7 +116,7 @@ if (-not $args) {
|
|||||||
if ($chkcmd -notcontains "CMD is working") {
|
if ($chkcmd -notcontains "CMD is working") {
|
||||||
Write-Warning "cmd.exe is not working.`nReport this issue at $troubleshoot"
|
Write-Warning "cmd.exe is not working.`nReport this issue at $troubleshoot"
|
||||||
}
|
}
|
||||||
saps -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" $args""" -Wait
|
saps -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" -el $args""" -verb runas -Wait
|
||||||
CheckFile $FilePath
|
CheckFile $FilePath
|
||||||
|
|
||||||
if ($psv -lt 3) {
|
if ($psv -lt 3) {
|
||||||
|
Reference in New Issue
Block a user