Add watchdog-wow

This commit is contained in:
Gregory Lirent 2024-07-27 23:46:00 +03:00
commit 14ba747abd
Signed by: lirent
GPG Key ID: F616BE337EFFEE77
2 changed files with 12 additions and 0 deletions

2
watchdog-wow.bat Normal file
View File

@ -0,0 +1,2 @@
@echo off
powershell.exe -WindowStyle hidden %~dp0\watchdog-wow.ps1

10
watchdog-wow.ps1 Normal file
View File

@ -0,0 +1,10 @@
while ($true) {
$NRESP = Get-Process | Where-Object {$_.mainWindowTitle} | Where -Property MainWindowTitle -eq "World of Warcraft" | Where -Property Responding -eq $false
if ($NRESP) {
Stop-Process -InputObject $NRESP
}
Start-Sleep -s 120
}