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 +}