I am trying to run a command line in a depoyment as a step to see if an application is running. The command line is below:
tasklist /FI "IMAGENAME eq saplogon.exe" | find /I /N "saplogon.exe"
If it finds the file is running it will return an errorlevel of '0', if it doesn't it will return an errorlevel of '1'.
What I am setting up in the step is to run the command and that the success code is 1 (that it hasn't found the file) and then determining the steps from there.
Everytime I run the deployment though I get the following error:
Result: Deployment ended: The parameter is incorrect. I am assuming that I am missing something with the way commands are run? When I run the command on the PC directly it works fine, so maybe I am missing soimething with the context within which the command is running, or maybe there is requirement for additional consideration around the way LANSweeper runs the command?
I have tried putting the command in a batch file only to have the same result.
I cannot see anywhere a great deal of detail about how the deployment works, so I probably am misunderstanding something.
Any ideas?