Update watchdog-wow.ps1

This commit is contained in:
Gregory Lirent 2024-08-01 20:51:10 +03:00
parent f5357d8780
commit cf2007df3c
Signed by: lirent
GPG Key ID: F616BE337EFFEE77
2 changed files with 3 additions and 9 deletions

View File

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

View File

@ -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) { if ($NRESP) {
Stop-Process -InputObject $NRESP Stop-Process -InputObject $NRESP
} }
Start-Sleep -s 120
}