You might find yourself in a situation where deployment is stuck on a target machine, a big batch of deployments is launched, or a scheduled task is not progressing, and you want to cancel the deployment entirely, and you can't help but wonder ...
Is there any way to stop a deployment once it is triggered?
The fast answer is yes, there is!
But first, let's share some backend insight into how the Deployments module works.
Using scanning credentials, LsDeployment.exe is written to the local computer, it is stored in the Windows\LsDeployment folder.
All the details of the deployment package are written to the local computer's registry. Location: HKEY_LOCAL_MACHINE\SOFTWARE\lansweeper
A scheduled task is created on the local computer using the scanning credentials.
The scheduled task is executed and calls LsDeployment.exe with a GUID parameter to refer it to the correct registry location. Your Run Mode credentials are used for this.
LsDeployment executes the deployment package according to the steps stored in the local registry.
If the package share is used in a deployment step, the file is read directly from the share UNC path. The package share credentials provided in the Deployment\Security Options tab are used for this.
How do we stop a deployment once the Deploy button is pressed?
Before stopping a deployment, stop all Lansweeper services used for deploying in your network.
We have two main scenarios:
The scheduled tasks are already created on your target machines.
The scheduled tasks are created yet on your target machines
What to do if the scheduled tasks are already created on your target machines?
Boot the target computers in safe mode and remove the items below used to run the deployment:
The executable present in the C:\Windows\LSDeployment folder on the client machine.
The registry entries under HKEY_LOCAL_MACHINE\Software\lansweeper\Remote deployment
What to do if the scheduled tasks have not been created yet on your target machines?
Stopping the Lansweeper Server service in Windows Services on your Lansweeper Server. (this will immediately prevent deployments from being sent if they haven't yet)
Deleting any deployment schedules under Deployment\Scheduled Deployments.
Run the script below via DatabaseMaintenance.exe, which can be found in the Program Files (x86)\Lansweeper\Tools folder on your Lansweeper server.
Delete from tsyspackageexecution
Delete from tsyspackagelogs
Restart your Lansweeper Server and IIS Express services.
Was this post helpful? Leave a Kudo! Did you have a similar issue and a
different solution? Share your work in the comments below and help your fellow IT Hero's! More questions? Browse
Quick Tech Solutions
If you can't find what you're looking for, create a post in our Community Forum.