Service_Stop
Description
Section titled “Description”Stops the specified service. If the service is already stopped, the function returns True.
Syntax
Section titled “Syntax”Service_Stop(sServiceName) As Boolean
Parameters
Section titled “Parameters”sServiceName (String)
Section titled “sServiceName (String)”Name of the service. Use the service name, for example Spooler, not the display name.
Return value
Section titled “Return value”The function returns False if the service doesn’t exist, or if Windows can’t stop it, for example because other running services depend on it. giErrorCode contains the return code from Windows.
Example
Section titled “Example”If bStatus Then bStatus = Service_Stop("Service")Related functions
Section titled “Related functions”Service_Exist Service_Delete Constants Package Property Variables