ServiceRemoveService

InstallShield 2018 » InstallScript Language Reference

The ServiceRemoveService function removes the service that is specified by szServiceName from the service control manager database. If the service is running when the function is called, the installation stops the service before removing the service.

Syntax

ServiceRemoveService ( szServiceName );

Parameters

ServiceRemoveService Parameters

Parameter

Description

szServiceName

Specifies the name of the service.

Return Values

ServiceRemoveService Return Values

Return Value

Description

>= ISERR_SUCCESS

Indicates that the function removed the service from the service control manager database.

< ISERR_SUCCESS

Indicates that the function was unable to remove the service.

If this function fails, additional error information may be available by calling GetExtendedErrInfo and checking the value of its third argument. (This value typically indicates the result of internally calling the Windows API function GetLastError after a call to a Windows API function failed.)

You can obtain the error message text associated with a large negative return value—for example, -2147024891 (0x80070005)—by calling FormatMessage.

See Also