Verify explorer.exe is running it before stopping it

Issue #578
This commit is contained in:
Chris Long
2020-12-20 20:35:04 -08:00
committed by GitHub
parent 1a4509c340
commit cad9c0e553

View File

@@ -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..."