Skip to content

Service_Exist

Checks if the specified service exists.

Service_Exist(sServiceName, bMustExist) As Boolean

Name of the service. Use the service name, for example Spooler, not the display name.

If True, the function returns False when the service doesn’t exist

Result will be stored in gbValue: True if the service exists, otherwise False.

If bStatus Then bStatus = Service_Exist("ServiceName", False)
If bStatus Then bStatus = Job_WriteLog("Custom", "gbValue: " & gbValue, bStatus, True)

Scripting Guidelines

Service_GetState Service_SetLogonInformations Constants Package Property Variables