commit 14ba747abd8ded493f95dbdcb6067dbba40073dc Author: Gregory Lirent Date: Sat Jul 27 23:46:00 2024 +0300 Add watchdog-wow diff --git a/watchdog-wow.bat b/watchdog-wow.bat new file mode 100644 index 0000000..5895fa2 --- /dev/null +++ b/watchdog-wow.bat @@ -0,0 +1,2 @@ +@echo off +powershell.exe -WindowStyle hidden %~dp0\watchdog-wow.ps1 \ No newline at end of file diff --git a/watchdog-wow.ps1 b/watchdog-wow.ps1 new file mode 100644 index 0000000..0c99e6f --- /dev/null +++ b/watchdog-wow.ps1 @@ -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 +} \ No newline at end of file