Restart Service

The Restart Service action restarts a Windows service. In a combined system service call, the action first stops the service and then starts the service.

Note: The Actions Quick Reference provides a complete list of actions that you can print for easy reference.

Creating a Restart Service action

 

  1. If you do not already know the exact name of the service that you want to restart, find it.

    1. Open the Services window on the computer.

    2. Right-click on the service and select Properties.

    3. Identify the Service name at the top of the Properties window.

  2. In Nintex Bot, on the Actions list, click Computer and select Restart Service.

  3. Enter the Service name (not the display name). Optionally, click the Magic Wand to use the Expression Builder.

  4. Determine how long to wait for the service to settle before declaring the restart a success or failure. To enforce a timeout, select Timeout (secs) and enter the number of seconds to wait. By default, this check box is selected and Nintex Bot will wait for 30 seconds before declaring the restart a success or failure. If this check box is not selected, then Nintex Bot will wait indefinitely for the service to start.

  5. If needed, adjust the Run error task settings to fine tune how the action runs.

    • Run error task: A botflow containing an error task automatically runs the error task in the event of an error. If the botflow does not contain an error task, the botflow stops in the event of an error.
    • Stop on error: The botflow stops in the event of an error.
    • Ignore errors: The action is skipped in the event of an error and the botflow attempts to execute the next action.
  6. (Optional) Add a Note to document special instructions or functionality.

  7. Toggle the run switch to Run and click OK to execute and save the action.

  8. Note: The run switch is set to Run by default. To create or modify this action without executing it, click the slider to change the option to Don't Run.  For more information, go to Action Builder.

When the action is executed, Nintex Bot stops and restarts the service that the user has selected by entering the service name.

Important: If the user is not a local administrator and the bot is not running as an administrator, the action will fail and display an error 5 message stating that access to the registry key is denied.