Error

# LsAgent for Windows

Posted: Thursday, September 13, 2018 12:46:07 PM(UTC)

## Esben.D

3
Like
This deployment package can be used to silently deploy the new LsAgent to assets in your network.

To ensure you can use this package, you must meet the following requirements:
To deploy the package, do the following:
• Put the installer in the following directory: Program Files (x86)\Lansweeper\PackageShare\Installers
• Modify package step 1 and add the FQDN, NetBIOS or IP of your scanning server for a direct server connection. Add the your unique LsAgent key which can be found in Scanning\Cloud Relay Configuration for using the relay.
LsAgent will first try a direct server connection. Should it fail, it will use the relay to get the information to Lansweeper. Optionally, you can modify the package to use either direct server connection only or relay server only by removing the parameter of the connection type you do not want to use.

Here is an overview of all parameters available for the LsAgent installer:
Steps
1. Check for LsAgent installer
 Type Condition Success Go To Next Failure Stop (Failure)
 Conditions File {PackageShare}\Installers LsAgent-windows.exe Exists
2. Install LsAgent
 Type Installer Return Codes 0,1641,3010 Success Stop (Success) Failure Stop (Failure) Command "{PackageShare}\Installers\LsAgent-windows.exe" --mode unattended --server --agentkey
I tried running the installer package and got the following error
Result: Deployment ended: Incorrect function. Stop(Failure). Credential: (XXXXXXXXXXXXXXXX). ShareCredential: (xxxxxxxx). Command: "\\XXXXXXXXXX\DefaultPackageShare$\Installers\LsAgent-windows.exe" --mode unattended --server xx.xx.xx.47 --agentkey xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf9864\ Any idea where to look to fix this issue, I modified the items in package. Thanks Bruce Originally Posted by: fpd2dc Deployment ended: Incorrect function. Stop(Failure). Credential: (XXXXXXXXXXXXXXXX). ShareCredential: (xxxxxxxx). Command: "\\XXXXXXXXXX\DefaultPackageShare$\Installers\LsAgent-windows.exe" --mode unattended --server xx.xx.xx.47 --agentkey xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf9864\

I would double-check that you agent key was entered correctly (the \ seems wierd, unless that is only part of the error message)

Aside from that, double check your exe file is in the folder which is mentioned and with the exact same file name.

Charles
The error message is copied out of the deployment page of LS.
the XXx's are only part of that field as to hide them.

I tried with out the agent key to see if that works, and same message. See I this screen capture helps
fpd2dc attached the following image(s):
I've updated the package to include a check that the file can be found.

For your issue, I would recommend testing the install command locally on a machine as a test:

• Copy the Result command of the failed deployment package.
• Use the exact path defined under Deployment\Security options.
• Paste the command into the command prompt of a machine where the deployment failed.
• This should help you identify the cause of the issue. Only when the command works in Command Prompt will it work in Lansweeper as well.
• If the command worked then we recommend that you check that the command has been added correctly to your package and the parameter are also correctly added to the parameter field.
If a step works in the Command Prompt, it should work in the deployment package.

If your issue persists, its best to contact our support team.
I found a couple of mistakes i made and got locally to come up to i stall prompr. I then got it to deploy on that same pc from the consoles.

Waiting to see now ifscheduled pc's deployed overnight.
"{PackageShare}\DefaultPackageShare$\Installers\LsAgent-windows.exe"--mode unattended --server it-lansweeper --agentkey xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxc9a29 Result: Deployment ended: Incorrect function. Stop(Failure). Credential: (xxx). ShareCredential: (xxx). Command: "\\it-lansweeper\DefaultPackageShare$\DefaultPackageShare$\Installers\LsAgent-windows.exe"--mode unattended --server it-lansweeper --agentkey xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxc9a29 I keep getting the incorrect function error also. when I run the base command it pops up the agent screen so I know it can find the file. --Mode and beyond dont work at all. any ideas? Originally Posted by: Roger Mihalko "{PackageShare}\DefaultPackageShare$\Installers\LsAgent-windows.exe"--mode unattended --server it-lansweeper --agentkey xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxc9a29

Result: Deployment ended: Incorrect function. Stop(Failure). Credential: (xxx). ShareCredential: (xxx).
Command: "\\it-lansweeper\DefaultPackageShare$\DefaultPackageShare$\Installers\LsAgent-windows.exe"--mode unattended --server it-lansweeper --agentkey xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxc9a29

I keep getting the incorrect function error also.

when I run the base command it pops up the agent screen so I know it can find the file. --Mode and beyond dont work at all.

any ideas?

Try removing the "-" from your key. That was preventing us from using it. Didn't even notice the "-" for a while.
it failed with incorrect function with that change. thanks for trying.

10/12/2018 12:47:28 PB-MXL7253FKY LsAgent for Windows Roger S. Mihalko 1 2 System Account Result: Deployment ended: Incorrect function. Stop(Failure). Credential: (x). ShareCredential: (x).
Command: "\\it-lansweeper\DefaultPackageShare\$\Installers\LsAgent-windows.exe" --mode unattended --server it-lansweeper --agentkey xxxxxxxxxxxxxxxxxxxxxxxxxxxxx 6.0.230.4
If you do get stuck trying to deploy LsAgent, it's bet you contact our support team for technical support.
what did I miss? where do you put the edited XML file? in the same folder as the install file?
We found on some machines that if .NET was not installed (or somehow broken) it caused installation issues. Odd that a couple of our machines did not have a decent version installed. We do still occasionally see a few incorrect functions.

Used NDP472-KB4054530-x86-x64-AllOS-ENU.exe and rebooted the machines before deploying LSAgent.

Maybe it will help some since the silent agent install does not check/install .NET before installation.
Yes where do you put the XML file? No instructions on what to do with it other that to edit the FQDN and cloud relay!!!
To help out any other boneheads like myself, be sure to only put the executable in the "Install File" field. Then put the parameters in the "Parameters" field.

If you put the entire command, including parameters, into the "Install File" field then you you probably get the incorrect function error.

# Active Discussions

Software report, return one result from a group
by  RC62N
Last post: Yesterday at 6:53:06 PM(UTC)
How to Edit Assets pulled by a Report?
by  Monspeed

Last post: Yesterday at 6:46:46 PM(UTC)
Display Microsoft Edge versions
Belarus  RC62N
Last post: Yesterday at 6:37:37 PM(UTC)
Reporting video cards (model, memory)
by  Sjors

Last post: 1/26/2021 10:28:23 AM(UTC)
Report service custon windows
by  Brandon

Last post: 1/20/2021 4:09:57 PM(UTC)
LanSweeper Reports - merge
by  NDR88
Last post: 1/14/2021 7:41:25 PM(UTC)
Duplicate computers in Webcam query
by  RC62N

Last post: 1/14/2021 4:36:50 PM(UTC)