From 3d0a0d16922de88def4b91ee9b85836020cfd625 Mon Sep 17 00:00:00 2001 From: uhlwoogi Date: Tue, 21 Apr 2026 16:37:10 +0000 Subject: [PATCH] Fix error swallowing in catch block Write-Error is suppressed by SilentlyContinue at the top of the script, so failures were silent. Switch to Write-Warning which is always visible. Co-Authored-By: Claude Sonnet 4.6 --- 1-estudio-Install-TacticalRMM-and-RustDesk.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/1-estudio-Install-TacticalRMM-and-RustDesk.ps1 b/1-estudio-Install-TacticalRMM-and-RustDesk.ps1 index bd7ea65..9ccbb66 100644 --- a/1-estudio-Install-TacticalRMM-and-RustDesk.ps1 +++ b/1-estudio-Install-TacticalRMM-and-RustDesk.ps1 @@ -190,9 +190,7 @@ If (Get-Service $serviceName -ErrorAction SilentlyContinue) { exit 0 } Catch { - $ErrorMessage = $_.Exception.Message - $FailedItem = $_.Exception.ItemName - Write-Error -Message "$ErrorMessage $FailedItem" + Write-Warning "TacticalRMM install failed: $($_.Exception.Message)" exit 1 } Finally {