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 never see that share, so for them PCAnalyser is installed on the machine itself as a lightweight agent: an MSI puts the executable in Program Files and registers it to run at every logon, uploading the result straight to your xAssets instance over HTTPS. Nothing else is installed -- no service, no scheduler.

Choose by reachability, not by machine type: if a machine can reach the share at logon, the logon script needs nothing installed and nothing upgraded; if it cannot, use this. Most estates run both.

The MSI is pushed with whatever you already use to deploy software -- Intune, SCCM, Group Policy, an RMM tool -- and 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, not baked into the package.

This is a different thing from the Discovery Agent (DMPC), the always-on Windows service that monitors enrolled computers continuously. That service runs PCAnalyser itself; use one or the other on a given machine, not both (see Limits).

What the MSI Installs

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 4631 /coll <upload address of your instance> /settings -- the address is built into the package from the instance name you supply at install time

/flags 4631 is the standard 535 plus Windows services. /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, check with xAssets support that receiving is enabled -- the server silently discards uploads for an instance that has not been enabled, and for any IP address or computer name on its block list.

Uploaded files land in the instance's pcafiles folder and are imported by the next Discover > Load Now run or scheduled load, the same as files from a Collection Server.

When the Agent Runs

The Run key fires at interactive logon, not at boot -- the same trigger as a logon script, with the same consequence that machines nobody logs on to are not covered. A laptop that is only ever slept and woken runs the agent only after a restart or a sign-out, which for most estates means the weekly or fortnightly Windows Update reboot. There is no retry: if the machine is offline at that moment the upload is lost until the next logon. Coverage is therefore good for machines that reboot regularly and poor for ones that never do.

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, which lets the agent collect licence keys and other values outside the standard set. Two things are needed:

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

The file is deliberately not part of the MSI, because its contents are yours -- which products, which keys -- and the same file goes to every machine, so it is just one more file for the deployment tool to push. Because the installer does not own it, upgrades and uninstalls leave it alone and you can change it at any time without touching the agent; re-push the file and the next logon uses it. The sample supplied with xAssets covers NetSarang Xshell, Xftp and Xmanager and TeamViewer.

Two points follow from the logon-time run:

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

Upgrading an Installed Agent

From 7.3.45 the MSI is a standard major upgrade: running the same install command on a machine with an older version removes the old one and installs the new, rewriting the Run key with the current command line. Nothing extra is needed. (Builds before 7.3.45 did not remove earlier versions; if you meet "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 of the agent waits for the upload to finish, so on a machine that cannot reach the instance the install takes a minute or so longer before completing. 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 service (the DMPC endpoint agent). Both products install into C:\Program Files\xAssets\xAssets Discovery Agent\ and both own PCAnalyser\pcanalyser.exe; uninstalling either one deletes the file from under the other. The service already runs PCAnalyser on its own schedule, so the MSI adds nothing there.