Zoomed Image

Deploying PCAnalyser as an Agent

IT Asset Management Guide

Discovering a Network

Deploying PCAnalyser as an Agent

PCAnalyser normally runs from a Collection Server share, launched by a discovery script or a logon script (Manual Discovery and Logon Scripts). Laptops and work-from-home machines cannot reach that share. For them, an MSI installs PCAnalyser on the machine. The MSI puts the executable in Program Files and registers it to run at every logon. Each run uploads the result to your xAssets instance over HTTPS. Nothing else is installed.

Choose by network access. If a machine can reach the share at logon, use the logon script. It needs nothing installed or upgraded. If the machine cannot reach the share, use the MSI. Most estates use both.

Push the MSI with the tool you already use to deploy software, such as Intune, SCCM, Group Policy or an RMM tool. The same tool pushes the optional settings file described below. One MSI serves every hosted customer. The instance name is a parameter of the install command.

The xAssets Discovery Agent is a separate product. It monitors enrolled computers continuously and runs PCAnalyser itself. Use one or the other on a machine (see Limits).

MSI Contents

Item Detail
Files C:\Program Files\xAssets\xAssets Discovery Agent\PCAnalyser\pcanalyser.exe, plus an empty netdiscover folder and the deployment instructions one level up
Run key HKLM\Software\Microsoft\Windows\CurrentVersion\Run\PCAnalyser, so the agent runs each time any user logs on
First run The installer runs the agent once at the end of the install, so the machine appears in xAssets without waiting for a logon
Command line pcanalyser.exe /ignore all /db <instance> /enc /flags 12823 /coll <upload address of your instance> /settings -- the address is built into the package from the instance name you supply at install time

/flags 12823 is the standard 535 plus Windows services (4096) and BitLocker status (8192). BitLocker status needs administrator rights, so it comes from the install-time run. A run at user logon leaves it blank. /ignore all leaves the logged-on user out of the upload. /enc encrypts the file in transit and at rest.

Deploying It

Copy the MSI somewhere the target computers can read, then run it with your instance name. The whole deployment is two lines -- the MSI, then optionally the settings file -- and runs as SYSTEM or an administrator:

$MSI = "C:\xAssetsDeployment\xAssets Discovery Agent Deployment.msi"
$DBNAME = "myinstance"        # your instance name, the first part of the address you sign in at
$PORT = "443"

msiexec /i $MSI DBNAME=$DBNAME PORT=$PORT /quiet

# optional - extra fields, see below
Copy-Item "C:\xAssetsDeployment\pcasettings.ini" "C:\Program Files\xAssets\xAssets Discovery Agent\PCAnalyser\pcasettings.ini" -Force

DBNAME is the only value that changes between customers. PORT is always 443.

Tool How
Intune Add the MSI as a Win32 app (wrap it with the Content Prep Tool) with the msiexec line above as the install command, or add a PowerShell script that runs both lines. A line-of-business (plain MSI) app cannot pass DBNAME, so use one of those two
SCCM / ConfigMgr An application with a script installer, or a package running the script
Group Policy A computer startup script running the lines above (software installation policy cannot pass DBNAME without a transform). Group Policy Preferences can copy the settings file separately
RMM tools Any "run script as SYSTEM" action

Before the first upload arrives

Uploads are accepted only when receiving is switched on for the instance. If the agent runs but nothing appears, ask xAssets support to confirm that receiving is enabled. The server discards uploads without an error for an instance that is not enabled. It also discards uploads from any IP address or computer name on its block list.

Uploaded files go to the instance's pcafiles folder. The next scheduled load imports them, the same as files from a Collection Server. Load Now on the Discover tab of the Discovery Dashboard imports them at once.

Agent Run Timing

The Run key fires at interactive logon. This is the same trigger as a logon script, so machines nobody logs on to are not covered. A laptop that is only slept and woken runs the agent only after a restart or a sign-out. For most estates that is the weekly or fortnightly Windows Update reboot. There is no retry. If the machine is offline at that moment, nothing is uploaded until the next logon. Machines that rarely reboot are reported less often.

The agent runs as the logged-on user (a standard user, typically) and takes a few seconds. The one-off run at install time is different: it runs under the installer account, usually SYSTEM.

Adding Settings for Extra Fields

Collecting Additional Fields describes pcasettings.ini. The file makes the agent collect license keys and other values outside the standard set. It needs:

  1. The command line must carry /settings. MSI builds from version 7.3.45 (September 2026) include it. Upgrade an older install (see below). Without the file the switch does nothing, so it is always on.
  2. pcasettings.ini must be in the same folder as the exe: C:\Program Files\xAssets\xAssets Discovery Agent\PCAnalyser\pcasettings.ini -- the Copy-Item line in the script above.

The file is not part of the MSI. You choose its contents, and your deployment tool pushes it to every machine. Upgrades and uninstalls leave it alone. To change it, re-push the file. The next logon uses it. The sample supplied with xAssets covers NetSarang Xshell, Xftp and Xmanager and TeamViewer.

Because the agent runs at logon:

  • HKCU sections read the logged-on user's hive. A per-user license key is collected from whoever logs on. At the install-time run they read the installer account's hive and find nothing. This is expected.
  • Registry keys are read as that user. Keys under HKLM are normally readable by everyone. If a vendor locks its key to administrators, the section returns nothing.

Upgrading an Installed Agent

From 7.3.45 the MSI is a standard major upgrade. Run the same install command on a machine with an older version. It removes the old version, installs the new one and rewrites the Run key. (Builds before 7.3.45 did not remove earlier versions. If you see "another version of this product is already installed", uninstall the old one first.)

Uninstalling (msiexec /x $MSI /quiet, or from Programs and Features) removes the files and the Run key. A pcasettings.ini you deployed yourself is left behind in the otherwise empty folder.

The install-time run waits for the upload to finish. On a machine that cannot reach the instance, the install takes about a minute longer. It still completes.

Limits

  • The upload address is fixed to the xAssets hosted service. An on-premises installation needs an MSI built for its own address. Ask xAssets support.
  • No local copy of the PCA file is kept, so there is nothing to inspect on the endpoint. Use the server's pcafiles folder.
  • The agent is 32-bit and the package is 64-bit only. It does not install on 32-bit Windows.
  • Do not install it on a machine that has the xAssets Discovery Agent. Both products install into C:\Program Files\xAssets\xAssets Discovery Agent\ and both own PCAnalyser\pcanalyser.exe. Uninstalling either one deletes the file the other uses. The xAssets Discovery Agent already runs PCAnalyser on its own schedule.