Hi, I've got a autoit script on my server that checks a lot of services (windows 7). But it eats memory, a lot. After about an hour I need to restart the script. I'm sure it's pretty easy, but I can't really see the problem here ^^
Anyone got a hint?
$servicename = "Example" $stdout = Run('sc.exe query ' & $servicename, '', @SW_HIDE, 2) Local $data While 1 $data = StdOutRead($stdout) If @error Then Return 'unknown' If $data Then If StringInStr($data, 'Running') Then $data = 'Running' If StringInStr($data, 'Stopped') Then $data = 'Stopped' ExitLoop EndIf WEnd
Anyone got a hint?