summaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorWindowsAddict2024-11-18 16:32:10 +0000
committerWindowsAddict2024-11-18 16:32:10 +0000
commite697b59f3d08a76103469e4e7c7939eeb3ad4c82 (patch)
treec5c1690400f9901b8eef8489585de1fa17d28024 /static
parente08f5bdc46bfc02b7f1a88585cea3fcd08bd6419 (diff)
downloadmassgrave.dev-e697b59f3d08a76103469e4e7c7939eeb3ad4c82.zip
Add colors in troubleshoot info
Diffstat (limited to 'static')
-rw-r--r--static/get.ps111
1 files changed, 7 insertions, 4 deletions
diff --git a/static/get.ps1 b/static/get.ps1
index 82e7b18..3ea5c1a 100644
--- a/static/get.ps1
+++ b/static/get.ps1
@@ -8,15 +8,17 @@ write-host
function CheckFile {
if (-not (Test-Path -Path $FilePath)) {
Check3rdAV
- Write-Warning "Failed to create MAS file in temp folder, aborting!`n`nHelp - https://massgrave.dev/troubleshoot"
- throw
+ Write-Host "Failed to create MAS file in temp folder, aborting!"
+ Write-Host "Help - https://massgrave.dev/troubleshoot" -ForegroundColor White -BackgroundColor Blue
+ try { throw } catch {}
}
}
function Check3rdAV {
$avList = Get-CimInstance -Namespace root\SecurityCenter2 -Class AntiVirusProduct | Where-Object { $_.displayName -notlike '*windows*' } | Select-Object -ExpandProperty displayName
if ($avList) {
- Write-Warning "Installed 3rd party Antivirus might be blocking the script: $($avList -join ', ')"
+ Write-Host '3rd party Antivirus might be blocking the script - ' -ForegroundColor White -BackgroundColor Blue -NoNewline
+ Write-Host " $($avList -join ', ')" -ForegroundColor DarkRed -BackgroundColor White
}
}
@@ -33,7 +35,8 @@ foreach ($URL in $URLs | Sort-Object { Get-Random }) {
if (-not $response) {
Check3rdAV
- Write-Warning "Failed to retrieve MAS from any of the available repositories, aborting!`n`nHelp - https://massgrave.dev/troubleshoot"
+ Write-Host "Failed to retrieve MAS from any of the available repositories, aborting!"
+ Write-Host "Help - https://massgrave.dev/troubleshoot" -ForegroundColor White -BackgroundColor Blue
return
}