StopService
System function.
The StopService function stops the specified Windows XP/2003/Vista/Windows 7 Service. Not available in WinTask Lite.
Syntax
StopService(<service_name$>)
or
ret=StopService(<service_name$>)Parameters
<service_name$>: system name of the Windows XP/2003/Vista/Windows 7 Service to be stopped
Return value
Ret, numeric return code. When the specified service has been stopped correctly, the function returns 0, otherwise use this return code for Error Handling. The return code is 109 if WinTaskAdmin Service is not started. The return code is 5 if the access is denied.
See also
Example
StopService("WTScheduler") ' Returns 0 if WTScheduler (Service Scheduler) has been correctly stopped.