Shell & Service Issues
Posted on 1999-07-20
First, I'm not a programmer - I dabble and know a bit (DLL calls I do NOT know).
Trying to write a program that monitors services under NT.
In order to verify that the service exists and/or is running, I was going to use a shell command and redirect the output to a file - open that file and parse the information. Problem is, the NET START <service> command will not redirect to a file. So I need an alternate way of doing this - simple DLL calls (well detailed in any perspective answer), another way of reading the result of information from the shell, whatever. The following is more or less how I was intending to do this, assuming the redirection worked:
shell "net start " + ServiceName + " > ~svcchk.tmp"
open "~svcchk.tmp" for input as #1
line input #1, StartServiceResult
If instr(StartServiceResult, <string>) then