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