Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: wntServiceAt
I also want the ability to do a net start and net stop with a WB function. Ideas?
MyService = "Spooler" AddExtender("WWWNT34I.DLL") exist = wntSvcStatus("", MyService , 0, 0) ; check existence Spooler service if exist==@true state = wntSvcStatus("", MyService , 0, 2) ; get the current state of the Spooler service Switch state case 1 Message("SERVICE_STOPPED","The service is not running.") break case 2 Message("SERVICE_START_PENDING","The service is starting.") break case 3 Message("SERVICE_STOP_PENDING","The service is stopping.") break case 4 Message("SERVICE_RUNNING","The service is running.") break case 5 Message("SERVICE_CONTINUE_PENDING","The service continue is pending.") break case 6 Message("SERVICE_PAUSE_PENDING","The service pause is pending.") break case 7 Message("SERVICE_PAUSED","The service is paused.") break EndSwitch else message("Service checker",strcat(MyService," service does not exist")) endif
See the Win32 network extender for the commands wntSvcStart to start a service, and wntSvcContol to stop a service.
Article ID: W13648
Filename: How to Check for NT Service on a Particular Machine.txt
File Created: 2001:03:01:13:25:06
Last Updated: 2001:03:01:13:25:06