Update wow watchdog
This commit is contained in:
parent
25af70f24f
commit
d5a334ec42
@ -1,7 +1,15 @@
|
|||||||
|
$WATCHDOG=0
|
||||||
|
|
||||||
for (;;) {
|
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) {
|
if ($NRESP) {
|
||||||
|
$WATCHDOG += 1
|
||||||
|
} else {
|
||||||
|
$WATCHDOG = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($WATCHDOG -ge 5) {
|
||||||
Stop-Process -InputObject $NRESP
|
Stop-Process -InputObject $NRESP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user