From 14ba747abd8ded493f95dbdcb6067dbba40073dc Mon Sep 17 00:00:00 2001 From: Gregory Lirent Date: Sat, 27 Jul 2024 23:46:00 +0300 Subject: [PATCH] Add watchdog-wow --- watchdog-wow.bat | 2 ++ watchdog-wow.ps1 | 10 ++++++++++ 2 files changed, 12 insertions(+) create mode 100644 watchdog-wow.bat create mode 100644 watchdog-wow.ps1 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