cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Frederik_Hansen
Engaged Sweeper II
I have trouble using deployment to run batch files. My batch files work perfectly fine, but the deloyment just waits to time out without retuning anything. I've tried making the success condition a seperate step that just checks whether the file was copied to the location (which is what the batch does) or not. Any solutions to this?

Thanks in advance!
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
For everyone's benefit, I've posted a sample package here that copies a file from one location to another. You can import this package into your Lansweeper installation by following these instructions. This package works for me and returns a Stop(Success) message after the file is copied. I used a basic Command step.

I'm personally unable to reproduce the issue described in this post, i.e. Lansweeper successfully running the command but not returning a Stop(Success) message. It wasn't clear to me from the initial post in this topic that this was what was happening either. I assumed the command just wasn't being executed at all.

In general, in case of deployment issues, we recommend updating your Lansweeper installation (as we did fix some deployment bugs recently) and then manually testing the result command of your deployment step in Command Prompt on a client machine.

View solution in original post

6 REPLIES 6
Susan_A
Lansweeper Alumni
For everyone's benefit, I've posted a sample package here that copies a file from one location to another. You can import this package into your Lansweeper installation by following these instructions. This package works for me and returns a Stop(Success) message after the file is copied. I used a basic Command step.

I'm personally unable to reproduce the issue described in this post, i.e. Lansweeper successfully running the command but not returning a Stop(Success) message. It wasn't clear to me from the initial post in this topic that this was what was happening either. I assumed the command just wasn't being executed at all.

In general, in case of deployment issues, we recommend updating your Lansweeper installation (as we did fix some deployment bugs recently) and then manually testing the result command of your deployment step in Command Prompt on a client machine.
Susan_A
Lansweeper Alumni
You should definitely, as i.kulgu suggested as well, test the command manually first. Run the Result Command of your step in Command Prompt on a client machine, under the same account used by Lansweeper, and verify whether any errors are generated. Only when the command fully works in Command Prompt will it work in Lansweeper as well.
Susan.A wrote:
You should definitely, as i.kulgu suggested as well, test the command manually first. Run the Result Command of your step in Command Prompt on a client machine, under the same account used by Lansweeper, and verify whether any errors are generated. Only when the command fully works in Command Prompt will it work in Lansweeper as well.


The Problem is not that the batch files don't work. They do both locally and when I deploy them -the files are copied on the clients' machines. The problem is that Lansweeper tells me the deployment failed because it timed out.
The batch files consist of one copy x to y function and exit after that.
i_kulgu
Champion Sweeper
If there is any user interaction needed, like to press a button or clicking ok than it will fail with timeout.
You can try to set echo off on the first line.
i.kulgu wrote:
If there is any user interaction needed, like to press a button or clicking ok than it will fail with timeout.
You can try to set echo off on the first line.


None at all. The batch files just copy one file each. I tried @echo off, but it changed nothing. I also tried writing "exit" at the end of the batch, which also did nothing. I guess restarting the Lansweeper server is next...
Frederik Hansen wrote:
i.kulgu wrote:
If there is any user interaction needed, like to press a button or clicking ok than it will fail with timeout.
You can try to set echo off on the first line.


None at all. The batch files just copy one file each. I tried @echo off, but it changed nothing. I also tried writing "exit" at the end of the batch, which also did nothing. I guess restarting the Lansweeper server is next...


Did you tried to run the batch file on the client computer manually?
I always test batch files on client computer with client rights.
Can you post the batch file you use ?