From 0859928964c799f55277f168eb63cdbf9791199e Mon Sep 17 00:00:00 2001 From: Gregory Lirent Date: Thu, 1 Aug 2024 23:40:22 +0300 Subject: [PATCH] Update watchdog-wow.ps1 --- watchdog-wow.ps1 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/watchdog-wow.ps1 b/watchdog-wow.ps1 index 8af7fe1..b94eb39 100644 --- a/watchdog-wow.ps1 +++ b/watchdog-wow.ps1 @@ -1,6 +1,9 @@ +for (;;) { + $NRESP = Get-Process | Where-Object {$_.mainWindowTitle} | Where -Property MainWindowTitle -eq "World of Warcraft" | Where -Property Responding -eq $false -$NRESP = Get-Process | Where-Object {$_.mainWindowTitle} | Where -Property MainWindowTitle -eq "World of Warcraft" | Where -Property Responding -eq $false + if ($NRESP) { + Stop-Process -InputObject $NRESP + } -if ($NRESP) { - Stop-Process -InputObject $NRESP -} \ No newline at end of file + Start-Sleep 60 +}