From 67c8992c48ed76c6e31fbc468df903ced8e3176c Mon Sep 17 00:00:00 2001 From: uhlwoogi Date: Sun, 3 Aug 2025 15:53:52 -0500 Subject: [PATCH] Update Tadco_Setup_Script.ps1 Added Debug to try to understand why PS just closes --- Tadco_Setup_Script.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tadco_Setup_Script.ps1 b/Tadco_Setup_Script.ps1 index 80c78d4..420af16 100644 --- a/Tadco_Setup_Script.ps1 +++ b/Tadco_Setup_Script.ps1 @@ -178,3 +178,15 @@ if (-not (Select-String -Path $logFile -Pattern "DEBLOATER_RAN" -Quiet)) { Start-Process powershell -ArgumentList "-ExecutionPolicy Bypass -File `"$debloaterScript`"" -Verb RunAs Log "DEBLOATER_RAN" } + + +try { + # your entire script is above this block + Log "Tadco setup script completed successfully." +} catch { + Log "ERROR: $($_.Exception.Message)" + Write-Host "ERROR: $($_.Exception.Message)" -ForegroundColor Red +} finally { + Write-Host "`nPress Enter to close..." -ForegroundColor Cyan + Read-Host +}