Handling Failed Service Operations: Best Practices & Strategies

Handling Failed Service Operations: Best Practices & Strategies

Kenneth Lv8

Handling Failed Service Operations: Best Practices & Strategies

Table of Contents

Disclaimer: This post includes affiliate links

If you click on a link and make a purchase, I may receive a commission at no extra cost to you.

IServiceFailureOperation

https://techidaily.com

Declaration

IServiceFailureOperation : IBaseServiceOperation

https://techidaily.com

Overview

This interface is meant to edit service failure operation properties. A service Failure Operation allows you to set failure actions for a service which is already installed or being installed by the current package.

Properties

Bool ConfigureOnInstall - Gets or sets the configure option during component’s installation.

Bool ConfigureOnUninstall - Gets or sets the configure option during component’s uninstallation.

Bool ConfigureOnReinstall - Gets or sets the configure option during component’s reinstallation.

Array FailureActions - Gets the collection of actions to be taken in case the specified service fails.

Uint DaysBeforeResetFailureCount - Gets or sets the number of days before the number of failures will be reset. The Service Control Manager (SCM) counts the number of times each service has failed since the system was started. When the service fails for Nth time, the system performs the action with the corresponding index in “Failure Actions” list.

String RebootMessage - Gets or sets the message to be sent to network users before restarting the computer in response to a “Restart the computer” action specified in the “Failure Actions” list..

RunProgram - Gets or sets the program to run in response to a “Run a program” action specified in the “Failure Actions” list. Use [~] formatted string to delete the current command and run no program when the service fails. To keep using the current run program leave this field empty..

RunProgramArguments - Gets or sets the the arguments for the specified program to run.

https://techidaily.com

Methods

NewFailureAction(String aActionType, Uint aExecutionDelayInMinutes) returns IFailureAction
Creates a new failure action. Argument “aActionType” supported values: “NoAction”, “RestartService”, “RestartComputer”, “RunProgram”.

RemoveFailureActionAtIndex(Uint aActionIndex)
Removes the failure action at the specified index.

https://techidaily.com

See also

IServiceControlOperation

IBaseServiceOperation

Did you find this page useful?

Please give it a rating:

Thanks!

Report a problem on this page

Information is incorrect or missing

Information is unclear or confusing

Something else

Can you tell us what’s wrong?

Send message

Also read:

  • Title: Handling Failed Service Operations: Best Practices & Strategies
  • Author: Kenneth
  • Created at : 2024-10-09 03:08:28
  • Updated at : 2024-10-10 19:55:49
  • Link: https://fox-sys.techidaily.com/handling-failed-service-operations-best-practices-and-strategies/
  • License: This work is licensed under CC BY-NC-SA 4.0.