Service_Exist
Description
Section titled “Description”Checks if the specified service exists.
Syntax
Section titled “Syntax”Service_Exist(sServiceName, bMustExist) 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.
bMustExist (Boolean)
Section titled “bMustExist (Boolean)”If True, the function returns False when the service doesn’t exist
Return value
Section titled “Return value”Result will be stored in gbValue: True if the service exists, otherwise False.
Example
Section titled “Example”If bStatus Then bStatus = Service_Exist("ServiceName", False)If bStatus Then bStatus = Job_WriteLog("Custom", "gbValue: " & gbValue, bStatus, True)Related functions
Section titled “Related functions”Service_GetState Service_SetLogonInformations Constants Package Property Variables