From 64374e3ecbd162e1840cb9ff8494aa6c21e69d9a Mon Sep 17 00:00:00 2001 From: Howard Enos Date: Tue, 26 May 2026 12:40:54 -0700 Subject: [PATCH] sync: auto-sync from HOWARD-HOME at 2026-05-26 12:40:52 Author: Howard Enos Machine: HOWARD-HOME Timestamp: 2026-05-26 12:40:52 --- .../msp-tools/guru-scan/Invoke-GuruScan.ps1 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/projects/msp-tools/guru-scan/Invoke-GuruScan.ps1 b/projects/msp-tools/guru-scan/Invoke-GuruScan.ps1 index 09f7a5a..2f78363 100644 --- a/projects/msp-tools/guru-scan/Invoke-GuruScan.ps1 +++ b/projects/msp-tools/guru-scan/Invoke-GuruScan.ps1 @@ -116,9 +116,9 @@ $ScannerDefs = @( Category = 'process-killer' Exe = "$Base\downloads\rkill.exe" InstallerExe = $null - ScanArgs = @('-s', "-l `"$Base\logs\rkill.log`"") - CleanArgs = @('-s', "-l `"$Base\logs\rkill.log`"") - LogSrc = $null + ScanArgs = @('-s', "-l `"{LOG_ROOT}\rkill.log`"") + CleanArgs = @('-s', "-l `"{LOG_ROOT}\rkill.log`"") + LogSrc = '{LOG_ROOT}\rkill.log' TimeoutMin = 10 RandomizeExe = $false PreCloseProcesses = @() @@ -188,10 +188,10 @@ $ScannerDefs = @( Category = 'antimalware' Exe = "$Base\downloads\esetonlinescanner.exe" InstallerExe = $null - ScanArgs = @('--install-silent', '--scan-potentially-unwanted=yes', '--scan-potentially-unsafe=yes') - CleanArgs = @('--install-silent', '--remove-found-threats=yes', '--scan-potentially-unwanted=yes', '--scan-potentially-unsafe=yes') + ScanArgs = @('/silent', '/unwanted') + CleanArgs = @('/silent', '/unwanted', '/clean') LogSrc = $null - TimeoutMin = 120 + TimeoutMin = 240 RandomizeExe = $false PreCloseProcesses = @() PreCleanPaths = @() @@ -242,11 +242,14 @@ function Wait-ProcessWithTimeout { $deadline = (Get-Date).AddSeconds($TimeoutSeconds) while (-not $Process.HasExited) { if ((Get-Date) -gt $deadline) { - try { $Process.Kill() } catch { } + try { $Process.Kill() } catch {} + $Process.WaitForExit(5000) | Out-Null return $false } Start-Sleep -Seconds 5 } + # Flush the exit code — required before ExitCode property is readable + $Process.WaitForExit(5000) | Out-Null return $true }