BeyondTrust Jump client Failins to start on domain-joined machine.

I've had some workstations recently experience the BeyondTrust jump client sitting in a stopped state, even when the service is configured to start automatically after start up (with or without delay).

Double click on the service to pull up the details. Note the "Service Name" and the "Startup Type". The service name we will need later when setting up our solution file. The startup type should be set to 'Automatic', this way windows will try to start the service up as soon as it is able.

Now you can just go ahead and start the service, and hope that the service self restarts going forward, but we're here because it didn't.

To give ourselves some peace of mind we can set a Scheduled task that will trigger when the service failure is detected in the Event Manager.

Creating the Task

Let's begin by taking the service name from the stopped service, creating a text file (you can call it anything you want), and filling it with the following:

net stop '%Service Name%' /y 
timeout /t 10
net start '%Service Name%'

Clearly, this little script will just stop the service, wait ten seconds, and then starts it again using net start/stop. Lets save this on the desktop for now, and come back to it later.

Bring up Task Scheduler, navigating under 'Action' --> 'Create Task...', make sure to select 'Run whether user is logged on or not', as well as 'Run with highest privileges'. This will allow it to run as the system, and you can avoid having it fail because the user permissions are insufficient.

Next, navigate to the Triggers tab to select the trigger that will prompt the task to start.

To begin the task, select a trigger type of 'On an event'. The source will be the Service Control Manager and the event ID should be set to 7000, which is the event ID that the SCM will flag if a service fails to start.

Set the 'stop task' checkbox to stop after an hour, to prevent the task from stealing resources if it can't complete. Enable the Trigger, and click 'Ok'.

Next, we need to configure our intentions for when the trigger activation happens on the Action tab. First, we need to return to the text file that we made earlier on the desktop, move it into the %user%\AppData folder, and change the extension to .bat. Select 'Start a program' under 'Action' and under settings, enter in the path to the saved batch file in the %user%\AppData folder. We don't need to worry about any additional arguments.

Conditions and Settings don't need any additional configuration from us, so we can go ahead and save our configuration and apply it. You will see the task show up in the list of Scheduled Tasks.

In an ideal world you'd have time to either recreate the full BeyondTrust jump client installer or do some troubleshooting on the machine as to why it's failing, but when there's just no time, this is a good way to keep an inconvenient jump client from being a recurring thorn.