Next Topic

Previous Topic

Book Contents

windowsServiceRecoverySettings()

Sets the Service Recovery Settings for any given service in Windows. Specify the name of the service you wish to modify, then set both the first and second restart failure options and any subsequent restart failure options. See startWindowsService() stopWindowsService(), and disableWindowsService().

Note: Be sure to use the service name of the service, not the display name of the service. For example, the display name of the service for Microsoft SQL Server is SQL Server (MSSQLSERVER), but the service name of the service is MSSQLSERVER. For Windows machines, right click any service in the Services window and click the Properties option to see the service name of that service.

Operating systems supported: Windows

Example

windowsServiceRecoverySettings("btwdins", "Restart the Service", "Restart the Service", "All Operating Systems", "Halt on Fail")