From 27f629b6b3e2648d654a955274c939581d2d4eb7 Mon Sep 17 00:00:00 2001 From: JKelly180 <64542346+JKelly180@users.noreply.github.com> Date: Fri, 23 Dec 2022 12:51:53 +0000 Subject: [PATCH] Changing the way Show-BISFProgressBar handles processes by specifying process ID instead of just process name --- Framework/SubCall/Preparation/10_PrepBISF_AV-WinDefend.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Framework/SubCall/Preparation/10_PrepBISF_AV-WinDefend.ps1 b/Framework/SubCall/Preparation/10_PrepBISF_AV-WinDefend.ps1 index 4f9d68341..6345b88cb 100644 --- a/Framework/SubCall/Preparation/10_PrepBISF_AV-WinDefend.ps1 +++ b/Framework/SubCall/Preparation/10_PrepBISF_AV-WinDefend.ps1 @@ -73,8 +73,9 @@ Process { } Write-BISFLog -Msg "Running Scan with arguments: $args" - Start-Process -FilePath "$ProductPath\MpCMDrun.exe" -ArgumentList $args -WindowStyle Hidden - Show-BISFProgressBar -CheckProcess "MpCMDrun" -ActivityText "$Product is scanning the system...please wait" + #Gather process info for the MpCmdRun process so we can pass the correct ID to Show-BISFProgressBar + $MpCmdRunProc = Start-Process -FilePath "$ProductPath\MpCMDrun.exe" -ArgumentList $args -WindowStyle Hidden -PassThru + Show-BISFProgressBar -CheckProcessId $MpCmdRunProc.Id -ActivityText "$Product is scanning the system...please wait" } Else { Write-BISFLog -Msg "No Scan will be performed"