Skip to main content

Use a Configuration File to Install Windows Agent

You can use a config.json configuration file with the Windows agent MSI package to install the agent.

  1. Download the Windows agent MSI package using the instructions in Download Windows Agent Installer.

  2. Create a config.json file on your host using a text editor.

    note

    Do not create the config.json file in the C:\ProgramData\Lacework\ directory where the Windows agent components will be installed.

  3. Paste the following into the config.json file:

    {
    "tokens": {
    "accesstoken": "Your_Access_Token"
    },
    "serverurl": "Your_API_Endpoint"
    }
  4. Specify the agent access token in the "accessToken":"Your_Access_Token line, where Your_Access_Token is the character string that identifies the specific access token to use with the agent. Obtain the access token using the instructions in Obtain an Access Token for the Windows Agent.

  5. Specify the Lacework server URL in the "serverurl":"Your_API_Endpoint line, where Your_API_Endpoint is the agent server URL. The default endpoint that the agent communicates with is https://api.lacework.net and the default region is US.

    note

    Please note that serverurl is optional if your Lacework tenant is deployed in the US, but mandatory for other tenants.

  6. By default, the agent is automatically upgraded when a new version is available. To disable automatic upgrade, see Automatic Upgrade of Windows Agent.

  7. Save the config.json file in the ASCII format and note the location of the file.

  8. Open a PowerShell terminal as administrator.

  9. Navigate to the directory containing the Windows agent MSI package on your host.

  10. Run the MSI package using the following command in the PowerShell command line:

    C:\Users\Administrator> msiexec.exe /i LWDataCollector.msi CONFIGFILE=C:\path\to\config.json

    Where C:\path\to\config.json is the file path for the config.json file. An installation wizard appears.

  11. Complete the installation using the installation wizard.

    The config.json file is copied to the C:\ProgramData\Lacework\ directory. You can modify this file to change the settings for the agent. If you modify the file, you must restart the agent for the changes to take effect. For more information, see Restart Windows Agent.