Skip to content

Product Detection

Besides the Server Discovery the 2nd most important mandatory configuration block is how the updater can detect the local product it governs and how to determine if it is outdated or not. These settings can be provided either by the local or remote configuration. The following detection mechanisms are currently implemented.

Detection methods

RegistryValue

Badge

The product version is queried from a Registry location.

The value to query must be a string of of type REG_SZ.

Field Description Mandatory
view The Alternate Registry View to use if a 32-Bit updater process needs to read a 64-Bit key and vice versa. Only useful if the updater architecture differs from the installed product architecture (e.g. the product is a 32-Bit installation and the updater is a 64-Bit build). In most cases it should be avoided to mix architectures and simply use the value Default. Possible values are:
  • Default - Doesn't alter default behaviour. (Default if omitted)
  • WOW64_64KEY - Access a 64-bit key from either a 32-bit or 64-bit application.
  • WOW64_32KEY - Access a 32-bit key from either a 32-bit or 64-bit application.
No
hive The hive to search in. Possible values are:
  • HKCU for HKEY_CURRENT_USER
  • HKLM for HKEY_LOCAL_MACHINE
  • HKCR for HKEY_CLASSES_ROOT
Yes
key The sub-key path under the specified hive. For example SOFTWARE\Nefarius Software Solutions e.U.\HidHide. Yes
value The REG_SZ (string) value to read. For example Version. Yes

FileVersion

Badge

Reads the VERSIONINFO resource of a given file where the FileVersion (or ProductVersion) will get compared to the release's detectionVersion field provided by the server.

Field Description Mandatory
input The absolute path or the inja template resolve the path to the client file to read. Yes
statement The version resource statement to read. Possible values are:
  • FILEVERSION - The binary version number for the file.
  • PRODUCTVERSION - The binary version number for the product with which the file is distributed. This is the default, if omitted.
No
data A dictionary/map of the data used in the template. No

FileSize

Badge

Reads a file's size (in bytes) and compares it to the release's detectionSize field provided by the server. If the local size doesn't match the release size the product is flagged as outdated.

Field Description Mandatory
input The absolute path or the inja template resolve the path to the client file to read. Yes
data A dictionary/map of the data used in the template. No

FileChecksum

Badge

Computes a file's hash/checksum via the algorithm specified in the release and compares it to the detectionChecksum.checksum field. If the locally computed hash doesn't match the release hash (case-insensitive) the product is flagged as outdated.

Field Description Mandatory
input The absolute path or the inja template resolve the path to the client file to read. Yes
data A dictionary/map of the data used in the template. No

CustomExpression

Badge

Evaluates a custom inja expression to determine the state.

Returning true indicates the product is considered outdated, return false otherwise.

Field Description Mandatory
input The inja template to evaluate on the client. Yes
data A dictionary/map of the data used in the template. No

Access to data in your expression

You can use three pre-defined variables in your template/expression:
- merged holds the shared configuration state of the client.
- remote holds the server response.
- parameters holds the contents of the data field from the detection configuration (i.e. the data key in the same object as input). Depending on the active authority setting, this may come from the local configuration file or from the server-provided detection config. It is not unconditionally "what the server provided".

In addition, all Inja template callbacks (envar, regval, inival, productBy, versionEq, versionGt, versionLt, exists, log) are available inside the expression.

FixedVersion

Badge

Overrides the detected version with a fixed version string.

Field Description Mandatory
version The version string. Yes

Release-side detection fields

Some detection methods compare a locally detected value against a reference provided on the release object in the remote configuration, rather than (or in addition to) the detection config itself.

Field Used by Description
detectionVersion RegistryValue, FileVersion, FixedVersion The expected version string for this release. If omitted, the release's version field is used as the fallback.
detectionSize FileSize The expected file size in bytes for this release.
detectionChecksum FileChecksum A ChecksumParameters object (checksum + checksumAlg) specifying the expected hash of the locally installed file for this release.

Command-line overrides

Two CLI flags bypass whatever detection method is configured:

Flag Effect
--local-version <version> Overrides the detected local version only when no detection method is configured in either the local or remote configuration.
--force-local-version <version> Unconditionally overrides the detected version, ignoring any detection method in local or remote configuration.