From cf2007df3c1ef121a58402c2c687cd6798f7f606 Mon Sep 17 00:00:00 2001 From: Gregory Lirent Date: Thu, 1 Aug 2024 20:51:10 +0300 Subject: [PATCH] Update watchdog-wow.ps1 --- watchdog-wow.bat | 2 -- watchdog-wow.ps1 | 10 +++------- 2 files changed, 3 insertions(+), 9 deletions(-) delete mode 100644 watchdog-wow.bat diff --git a/watchdog-wow.bat b/watchdog-wow.bat deleted file mode 100644 index 5895fa2..0000000 --- a/watchdog-wow.bat +++ /dev/null @@ -1,2 +0,0 @@ -@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 index 0c99e6f..8af7fe1 100644 --- a/watchdog-wow.ps1 +++ b/watchdog-wow.ps1 @@ -1,10 +1,6 @@ -while ($true) { - $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 - } - - Start-Sleep -s 120 +if ($NRESP) { + Stop-Process -InputObject $NRESP } \ No newline at end of file