summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorWindowsAddict2025-08-10 16:52:43 +0000
committerWindowsAddict2025-08-10 16:52:43 +0000
commit66b17892029a428286d251786cd72fd647f6495c (patch)
tree16e9c26212634875bef1a63acd8f58995cebb4ec /index.html
parent836a6d277b54224ba6feb257fc04a41c20a662a5 (diff)
downloadmassgravel.github.io-66b17892029a428286d251786cd72fd647f6495c.zip
Fix start-process and write-progress on PS 2.0
Diffstat (limited to 'index.html')
-rw-r--r--index.html15
1 files changed, 9 insertions, 6 deletions
diff --git a/index.html b/index.html
index be75a64..eb21f85 100644
--- a/index.html
+++ b/index.html
@@ -1,8 +1,10 @@
# This script is hosted on <b>https://get.activated.win</b> for <b>https://massgrave.dev</b><hr><pre>
if (-not $args) {
+ Write-Host ''
Write-Host 'Need help? Check our homepage: ' -NoNewline
Write-Host 'https://massgrave.dev' -ForegroundColor Green
+ Write-Host ''
}
& {
@@ -70,7 +72,7 @@ if (-not $args) {
$errors += $_
}
}
- Write-Progress -Activity "Downloading..." -Completed
+ Write-Progress -Activity "Downloading..." -Status "Done" -Completed
if (-not $response) {
Check3rdAV
@@ -116,14 +118,15 @@ if (-not $args) {
if ($chkcmd -notcontains "CMD is working") {
Write-Warning "cmd.exe is not working.`nReport this issue at $troubleshoot"
}
- saps -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" -el $args""" -verb runas -Wait
- CheckFile $FilePath
if ($psv -lt 3) {
- write-host ""
- write-host "Press any key to exit when process is done..."
- [void][System.Console]::ReadKey($true)
+ $p = saps -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" -el $args""" -Verb RunAs -PassThru
+ $p.WaitForExit()
}
+ else {
+ saps -FilePath $env:ComSpec -ArgumentList "/c """"$FilePath"" -el $args""" -Wait -Verb RunAs
+ }
+ CheckFile $FilePath
$FilePaths = @("$env:SystemRoot\Temp\MAS*.cmd", "$env:USERPROFILE\AppData\Local\Temp\MAS*.cmd")
foreach ($FilePath in $FilePaths) { Get-Item $FilePath -ErrorAction SilentlyContinue | Remove-Item }