Lansweeper LsAgent Silent Install (How-To Guide)

LsAgent is a small, lightweight application that gathers the asset data locally and then sends it back to your Lansweeper installation, either by using a direct push or through Lansweeper’s cloud-hosted relay service. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of the Lansweeper LsAgent from the command line using the EXE installer.

How to Install the Lansweeper LsAgent Silently

Lansweeper LsAgent Silent Install (EXE)

  1. Navigate to: https://www.lansweeper.com/download/lsagent/
  2. Download the LsAgent-windows.exe to a folder created at (C:\Downloads)
  3. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  4. Navigate to the C:\Downloads folder
  5. Enter the following command:
LsAgent-windows.exe --unattendedmodeui none --mode unattended --server <server> --port <port>

After a few moments you should see the Lansweeper LsAgent entries in the Installation Directory and Programs and Features in the Control Panel.

Software Title:LsAgent
Vendor:Lansweeper
Architecture:x86
Installer Type:EXE
Silent Install Switch:LsAgent-windows.exe --unattendedmodeui none --mode unattended --server <server> --port <port>
Silent Uninstall Switch:"%ProgramFiles(x86)%\LansweeperAgent\uninstall.exe" --unattendedmodeui none --mode unattended
Download Link:https://www.lansweeper.com/download/lsagent/
PowerShell Script:https://silentinstallhq.com/lansweeper-lsagent-install-and-uninstall-powershell/
Detection Script:https://silentinstallhq.com/create-a-custom-detection-script-for-lansweeper-lsagent-powershell/

The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download links provided take you directly to the vendors website. Continue reading if you are interested in additional details and configurations.


Additional Configurations

Available Command Line Parameters

--unattendedmodeui <unattendedmodeui>Unattended Mode UI
Default: none
Allowed: none minimal minimalWithDialogs
--optionfile <optionfile>Installation option file
Default:
--debuglevel <debuglevel>Debug information level of verbosity
Default: 2
Allowed: 0 1 2 3 4
--mode <mode>Installation mode
Default: win32
Allowed: win32 unattended
--installer-language <installer-language>Language selection
Default: en
Allowed: sq ar es_AR az eu pt_BR bg ca hr cs da nl en et fi fr de el he hu id it ja kk ko lv lt no fa pl pt ro ru sr zh_CN sk sl es sv th zh_TW tr tk uk va vi cy
–prefix <prefix>Installation Directory
Default: C:\Program Files (x86)\LansweeperAgent
–server <server>FQDN, NetBios or IP of the Scanning Server
Default:
–port <port>Listening Port on the Scanning Server
Default: 9524
–agentkey <agentkey>Cloud Relay Authentication Key (Optional)
Default:

How to Uninstall the Lansweeper LsAgent Silently

Check out the following posts for a scripted solution:

Lansweeper LsAgent Install and Uninstall (PowerShell)
Lansweeper LsAgent Silent Uninstall (PowerShell)
  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter the following command:

Lansweeper LsAgent Silent Uninstall (EXE)

"%ProgramFiles(x86)%\LansweeperAgent\uninstall.exe" --unattendedmodeui none --mode unattended

Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.

Jason Bergner

I am an accomplished Software Engineer at Patch My PC, leveraging more than 18 years of hands-on experience in Configuration Manager administration and application packaging. I am driven by a genuine passion for solving complex problems and consistently strive to discover innovative and effective solutions. Sharing my extensive knowledge of application deployments is a true joy for me, and I am honored to contribute to the community here at Silent Install HQ.

Recent Posts