From cad9c0e553469b060b7e5c497d677fda241d108d Mon Sep 17 00:00:00 2001 From: Chris Long Date: Sun, 20 Dec 2020 20:35:04 -0800 Subject: [PATCH] Verify explorer.exe is running it before stopping it Issue #578 --- Vagrant/scripts/install-sysinternals.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Vagrant/scripts/install-sysinternals.ps1 b/Vagrant/scripts/install-sysinternals.ps1 index 3caa0358a..da001836a 100755 --- a/Vagrant/scripts/install-sysinternals.ps1 +++ b/Vagrant/scripts/install-sysinternals.ps1 @@ -93,7 +93,9 @@ $Shortcut.TargetPath = $tcpviewPath $Shortcut.Save() # Restart Explorer so the taskbar shortcuts show up -Stop-Process -ProcessName explorer -Force +if (Get-Process -ProcessName explorer -ErrorAction 'silentlycontinue') { + Stop-Process -ProcessName explorer -Force +} # Download Olaf Hartongs Sysmon config Write-Host "$('[{0:HH:mm}]' -f (Get-Date)) Downloading Olaf Hartong's Sysmon config..."