---
title: "Install IT Agent on Windows | Lansweeper Platform"
slug: "install-it-agent-windows"
description: "Install the Lansweeper IT Agent on Windows to discover and track assets. Use the GUI, a silent install, the MSI package, or a deployment script."
status: "update"
updated: 2026-08-13T15:33:43Z
published: 2026-08-13T15:33:43Z
canonical: "docs.lansweeper.com/install-it-agent-windows"
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lansweeper.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install IT Agent - Windows

Use the IT Agent Discovery to identify and track assets that connect to your network. You can install it interactively or silently, depending on your deployment needs.

## Prerequisites

- Review the [IT Agent requirements](/docs/discovery-agent-requirements).
- Confirm the target computer runs a [supported operating system](/docs/install-it-agent-windows#supported-operating-systems).

## Supported operating systems

- Windows 7 SP1 or Windows 8.1, with Extended Security Updates (x64)
- Windows 10, version 1607 or higher (x64)
- Windows 11, version 22000 or higher (x64)
- Windows Server 2012 or higher (Core and Desktop Experience, x64)

## Install the agent

Interactive (GUI)Silent (config file)Silent (command line)Silent (msi package)Deployment script

Ideal for most users when installing on a few devices.

1. In your preferred site, go to **Discovery > Systems > Download installers/packages > IT Agent Discovery**.
2. Find the **exe** format and select **Download IT Agent installer**.
3. Run the downloaded installer.
4. When prompted, select **Yes** to allow the app to make changes to your device.
5. Read and select **I accept the agreement**.
6. Choose the installation directory and select **Next**.
7. In your site, select **Systems > Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
8. Paste the copied linking code into the installer and select **Next**.
9. Select **Next** again to start the installation.

Ideal for repeatable deployments across devices.

1. In your preferred site, go to **Discovery > Systems > Download installers/packages > IT Agent Discovery**.
2. Find the **exe** format and select **Download IT Agent installer** and **Download IT Agent silent installation configuration**.
3. In your site, select **Systems >** **Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
4. On your Windows computer, open the downloaded `lansweeperitagentinstallation.cfg` file.
5. Replace `cloudtokenvalue `with your copied linking code. If needed, configure proxy settings by removing the `#` symbols.

```plaintext
mode=unattended
accepteula=1
path=C:\Program Files\Lansweeper IT Agent Discovery
cloudtoken=cloudtokenvalue
#proxyserver=myproxyserver.domain.local
#proxyport=8080
```
6. Open an elevated Command Prompt and run the following command, replacing `X.X.X` with the installer version number:

> [!NOTE]
> Installer version
> 
> The version numbers for your installer can be found in your Lansweeper site. Go to **Discovery > Download installers/packages > IT Agent Discovery > Version** and locate your installer.

```bash
Lansweeper-IT-agent-discovery-X.X.X-windows-x64-installer.exe --optionfile lansweeperitagentinstallation.cfg
```

Ideal for scripted installs without editing a `.cfg` .

1. In your preferred site, go to **Discovery > Systems > Download installers/packages > IT Agent Discovery**.
2. Find the **exe** format and select **Download IT Agent installer**.
3. In your site, select **Systems >** **Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
4. Run this command in an elevated Command Prompt, replacing `cloudtokenvalue` with your copied linking code and` X.X.X `with the installer version:

> [!NOTE]
> Installer version
> 
> The version numbers for your installer can be found in your Lansweeper site. Go to **Discovery > Download installers/packages > IT Agent Discovery > Version** and locate your installer.

```bash
Lansweeper-IT-agent-discovery-X.X.X-windows-x64-installer.exe --mode unattended --accepteula 1 --path "C:\Program Files\Lansweeper IT Agent Discovery" --cloudtoken cloudtokenvalue
```

> [!NOTE]
> Proxy parameters
> 
> To use a proxy, add the parameters` --proxyserver proxyserveraddress` and `--proxyport`.

Ideal for large-scale or centrally managed environments that rely on enterprise software distribution.

1. In your preferred site, go to **Discovery > Systems > Download installers/packages > IT Agent Discovery**.
2. Find the **msi** format and select **Download IT Agent installer**.
3. In your site, select **Systems >** **Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
4. Run this command in an elevated Command Prompt, replacing `cloudtokenvalue` with your copied linking code and` X.X.X `with the installer version:

> [!NOTE]
> Installer version
> 
> The version numbers for your installer can be found in your Lansweeper site. Go to **Discovery > Download installers/packages > IT Agent Discovery > Version** and locate your installer.

```bash
msiexec /i "C:\Path\To\Lansweeper-IT-agent-discovery-X.X.X-windows-x64-installer.msi" /quiet ARGUMENTS="--mode unattended --accepteula 1 --cloudtoken cloudtokenvalue"
```

> [!NOTE]
> Proxy parameters
> 
> To use a proxy, add the parameters` --proxyserver proxyserveraddress` and `--proxyport`.

Ideal for automated, hands-off deployment that downloads the latest installer.

1. Copy the following script:

```powershell
# ==============================================
# Lansweeper IT Agent Discovery Silent Installer
# ==============================================
# --- 1. Set Cloud Token Variable ---
$CloudToken = "cloudtokenvalue"   # Replace with your linking code
# --- 2. Require TLS 1.2 for Downloads ---
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
# --- 3. Define Download URLs ---
$InstallerUrl = "https://download.lansweeper.com/stable/windows/it-agent-discovery/latest"
$ConfigUrl    = "https://download.lansweeper.com/stable/windows/lansweeper-it-agent-installation-config-stable/latest"
# --- 4. Define Local File Paths ---
$TempFolder   = "$env:TEMP\LansweeperInstaller"
$InstallerExe = "$TempFolder\Lansweeper-IT-Agent-Discovery-Installer.exe"
$ConfigFile   = "$TempFolder\install_config.cfg"
# --- 5. Prepare Temp Folder ---
if (Test-Path $TempFolder) {
    Remove-Item -Recurse -Force $TempFolder
}
New-Item -ItemType Directory -Path $TempFolder | Out-Null
# --- 6. Download Installer and Config ---
Write-Host "Downloading Lansweeper IT Agent Discovery installer..."
Invoke-WebRequest -Uri $InstallerUrl -OutFile $InstallerExe -UseBasicParsing
Write-Host "Downloading Lansweeper config file..."
Invoke-WebRequest -Uri $ConfigUrl -OutFile $ConfigFile -UseBasicParsing
# --- 7. Insert Cloud Token into Config ---
Write-Host "Updating config file with cloud token..."
(Get-Content $ConfigFile) -replace "cloudtokenvalue", $CloudToken |
    Set-Content $ConfigFile -Encoding UTF8
# --- 8. Run Silent Install with Config ---
Write-Host "Running silent installation..."
Start-Process -FilePath $InstallerExe -ArgumentList "--mode unattended --optionfile `"$ConfigFile`"" -Wait -NoNewWindow
# --- 9. Clean Up Temp Folder ---
if (Test-Path $TempFolder) {
    Remove-Item -Recurse -Force $TempFolder
    Write-Host "Temporary files removed."
}
Write-Host "Lansweeper IT Agent Discovery installation completed."
```
2. In your site, select **Systems >** **Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
3. In the first section of the script, replace `cloudtokenvalue` with your copied linking code.
4. Save your file as a PowerShell script, for example `Install-LSITAgent.ps1`.
5. Run the PowerShell script with administrative privileges.

  

---

  
    

## Troubleshooting

    
      

#### Installation fails with "Could not start Lansweeper IT Agent Discovery Hub Service"

        
        
          

The full message reads: "Could not start Lansweeper IT Agent Discovery Hub Service. The application will exit now." This can happen on machines with a slow hard disk, low memory, or limited CPU resources. To resolve it during installation:

          

1. Press **Windows + R** to open **Run**.
2. Enter `regedit` to open the **Registry Editor**.
3. Go to `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control`.
4. In the **Control** folder, create a new DWORD (32-bit) value named `ServicesPipeTimeout`.
5. Open the value, set **Base** to **Decimal**, and enter `600000` in **Value data**.
6. Select **OK**.
7. Restart your system. The change doesn't apply until you restart.
8. Run the IT Agent installer again.

        
      
    
    
      

#### Installation fails with "Unable to initialize installer"

        
        
          

This error occurs when the **TMP** or **TEMP** environment variable points to a path that doesn't exist. To fix it:

          

1. Press **Windows + R** to open **Run**.
2. Enter `sysdm.cpl` and press **Enter** to open **System Properties**.
3. In the **Advanced** tab, select **Environment Variables**.
4. Find **TMP** or **TEMP** under **User variables** or **System variables**.
5. Select the variable and select **Edit**.
6. Set **Variable value** to a valid folder path, such as `C:\Windows\Temp`.
7. Select **OK** to save your changes.
8. Run the installer again.

        
      
    
    
      

#### The installation log tells me to check TLS 1.2, internet access, or my linking code

        
        
          

Confirm the device can use `curl` to make outbound connections to [the URLs required for IT Agent Discovery](/docs/discovery-agent-requirements). Also confirm Microsoft Defender or Attack Surface Reduction rules aren't blocking `C:\Program Files\Lansweeper IT Agent Discovery\resources\curl.exe`.

        
      
    
    
      

#### The install keeps failing because of a previous corrupt install

        
        
          

Download the latest Windows installer from your Lansweeper Site (**Discovery > Systems > Download installers/packages**), then save the following as **ITAgentCleanup.bat**:

          

```
@echo off
:: BatchGotAdminREM  --> Check for permissions
nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
set params = %*:"=""
echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"
"%temp%\getadmin.vbs"
del "%temp%\getadmin.vbs"
exit /B
:gotAdmin
pushd "%CD%"
CD /D "%~dp0"
:: --------------------------------------
:: Uninstall Lansweeper IT Agent
"C:\Program Files\Lansweeper IT Agent Discovery\uninstall.exe" --mode unattended
:: Sleep for x seconds to continue
TIMEOUT /T 300
:: Ensure lingering services are stopped and removed
sc stop "Lansweeper IT Agent Discovery Hub Service"
sc delete "Lansweeper IT Agent Discovery Hub Service"
sc stop "Lansweeper IT Agent Discovery Sensor Service"
sc delete "Lansweeper IT Agent Discovery Sensor Service"
sc stop "Lansweeper IT Agent Discovery Update Service"
sc delete "Lansweeper IT Agent Discovery Update Service"
:: Sleep for x seconds to continue
TIMEOUT /T 60
:: Delete default install directory
del /S "C:\Program Files\Lansweeper IT Agent Discovery*"
:: Cleanup first reg location
for /f "delims="  %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Lansweeper" ^| find "Lansweeper IT Agent Discovery"') do (set "regs=%%a")
echo %regs%
reg delete "%regs%" /f
:: Cleanup second reg location
for /f "delims="  %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" ^| find "Lansweeper IT Agent Discovery"') do (set "regs=%%a")
echo %regs%
reg delete "%regs%" /f
:: Reinstall Lansweeper IT Agent
:: Update the path below to your installer's location and the cloudtoken value from your Lansweeper Site (Discovery > Systems > Link discovery system). Then uncomment the last line and run this file.
:: C:\Temp\Lansweeper-IT-agent-discovery-0.23.2-windows-x64-installer.exe --mode unattended --accepteula 1 --path "C:\Program Files\Lansweeper IT Agent Discovery" --cloudtoken cloudtokenvalue
```

  

Edit the last line in a text editor and run it on your computer.

  

  

  

  

## Next steps

Now that your IT Agent is installed, you can [create a discovery action](/docs/create-an-it-agent-discovery-action) to specify when discovery should occur.
