Service_Start
Description
Section titled “Description”Starts the specified service. If the service is already running, the function returns True.
The function doesn’t wait until the service is running. To wait for it, call Service_WaitForStart afterwards.
Syntax
Section titled “Syntax”Service_Start(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 start it. giErrorCode contains the return code from Windows.
Example
Section titled “Example”If bStatus Then bStatus = Service_Start("Service")Related functions
Section titled “Related functions”Service_Create Service_Exist Service_SetStartMode Service_WaitForStart Constants Package Property Variables