Asset Field Parameters

Calculated Fields

Calculated fields can be automatically populated from data extracted from text files, the Windows registry, environment variables and so on.

Environment Variable Extract Fields

This field is set up to read the value contained in an operating system’s environment string. For example, you may have the Host Name or SMS ID stored in an environment variable and want this to be automatically picked up by the scanner.

Parameter Description
Enter the name of an environment variable Examples of environment variables: TEMP and PATH.

 

Registry Extract Fields

This type of field searches the Windows registry for the defined key and makes an automatic entry of the key value. This extract field is applicable to Windows only.

Parameter Description

Enter registry path to the value

The full path to the registry value you want to have in this field in the form RegistryKey\Value.

Example:

To find out whether the Screen Saver is active on the system, you can use the following registry extract field:

HKEY_CURRENT_USER\Control Panel\Desktop\ScreenSaveActive

The registry does not allow the backslash ("\") character in the RegistryKey. However, it can be used in Value. If the backslash character is contained in the Value name, it must be escaped. For example, if Value is "a\b", it must be specified as follows:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\VSS\
VssAccessControl\\NT Authority\NetworkService

In Windows, the paths to various registry values can be found by viewing the content in the Registry Editor. For more information about the Registry Editor refer to the Windows documentation.

In 64-bit versions of Windows, portions of the registry entries are stored separately for 32-bit applications and 64-bit applications and mapped into separate logical registry views using the registry redirector and registry reflection. This is because the 64-bit version of an application may use different registry keys and values than the 32-bit version. There are also shared registry keys that are not redirected or reflected.

Because the Universal Discovery Windows scanner is a 32-bit application, by default, the scanner only reads the 32-bit portion of the registry.To access the 64-bit registry portion in 64-bit versions of Windows, the scanner supports the following prefixes:

Note The prefix includes the colon (:).

  • 32:. Forces only the 32-bit registry value to be read.
  • 64:. Forces only the 64-bit registry value to be read. In 32-bit versions of Windows, the registry extract field with this prefix will always be empty.
  • 3264:. Reads the 32-bit registry value, and, if it is empty, reads the 64-bit registry value.
  • 6432:. Reads the 64-bit registry value, and, if it is empty, reads the 32-bit registry value.

If no prefix is given, the scanner reads the 32-bit registry value only.

The actual registry value path should follow the prefix, as shown in the following example:

 

Text File Extract Fields

This field searches a named text file for a defined character string and makes an automatic entry of the characters between the search string and the end of the line.

This field type is normally used for the Asset Number field. This is used to extract the asset number from the file Asset.bat on the line containing the text: SET ASSETNO=

Parameter Description

File Name

The name of the file (and the file path) that the information is to be extracted from.

Note:

  • Entries in this field are case-sensitive. This is applicable to UNIX and Mac OS X only.

  • You can use an environment variable to specify the file name. The environment variable name must be in upper case for this to happen. If it is not, the string is interpreted as a literal.

    For example, if the path is %WINDIR%\SMS.INI, then the final path (assuming WinDir=C:\WINNT) will be C:\WINNT\SMS.INI.

    But if the path is %WinDir%\SMS.INI, then no substitution will take place and the file extract will fail. This is done to ensure that it is possible to extract files from a directory or a file that has one or more % signs in the name.

    Another example of using an environment variable is as follows:

    You can type: %HOME%/.bashrc , or %SYSTEMDIR%\win.ini. In this case, %HOME% will be replaced with the value of the HOME environment variable.

    This is applicable to all platforms, and UNIX notation of the form $NAME is not supported.

Search

Determines what information is to be extracted.

  • A search string expression can be created in two ways depending on the file contents:

  • If you type * (an asterisk) for the search string, the scanner takes the complete first line of the file.

    The scanner can find a line beginning with a particular anchor in a text file, and extract the rest of the line following the anchor. For example, if the line of the file has the following structure VariableName=Value, and Value needs to be extracted, set the search string to be VariableName=

Note

  • The search string is case insensitive.

  • In the file being extracted from, if a comment is on the same line as the search string, then the comment is also returned. To prevent this happening, ensure that any comments in the file are placed on separate lines from the search string. This is particularly relevant to UNIX users.

 

WMI Extract Fields

Windows Management Instrumentation (WMI) is a component of the Microsoft Windows operating system that provides management information.

Some data on Windows operating systems is only available via the WMI interface. This type of field allows the scanner to be configured to extract and store specific pieces of WMI data. The Windows scanner populates this field on computers where WMI is enabled.

Parameter Description
Query

Windows Management Instrumentation Query Language (WQL) is a subset of SQL that is used to make data queries inside WMI.

  • WQL Query. The following example of a WQL query collects the name and the frequency properties of the installed processor:

    For example, select Name,CurrentClockSpeed from Win32_Processor

    For more information about WMI and WQL refer to the Microsoft MSDN website.

    • WQL Query. The WQL query used to make data queries in WMI.

      For example, select Name,CurrentClockSpeed from Win32_Processor

      The above query collects the name and the frequency properties of the installed processor.

    • Object Path. Should usually be: root\cimv2

      This is the default path for CIM v2 data provided by WMI.

    • Timeout. Specifies how long (in seconds) to wait until the query returns a single instance of the queried data. If no data is returned within this period, the query returns nothing and the value of the field is blank.

      Note You can use -1 to wait indefinitely for the query to return data. However, this is not recommended since it may cause the query to hang.

    Options
    • Collect the first instance/Collect all instances. Determines whether to collect information from the first instance only, or from all instances.

      For example, if there are several processors in a computer you can choose to collect the information about the very first processor or about all processors.

      If instances are requested, their values are separated with the string specified in the Separate Instance With field.

      When multiple properties are specified, the values returned by the query will be separated with the string specified in the Separate Property Values With field.

    • Separate Instance With. When Collect all instances is selected, the values collected from each instance are separated with the string specified here.

    • Separate Property Values With. When multiple properties are specified, the values returned by the query are separated with the string specified here.

    Output Properties

    Enables you to add a property whose value is required in the asset field. The WQL query returns an instance of the WMI class which can have many properties. The required properties need to be specified manually.

    For example: select * from Win32_Processor

    This returns all properties for processor, but if Name is required, it should be specified in the Output Properties box.

    • . Enables you to add an output property.

    • . Enables you to remove the selected output property.

    Derived Fields

    Derived fields have dependencies on the data of other types of fields. That is, the data they contain is derived from other fields.

     

    Sequence Fields

    The Sequence field enables you to define a sequence of up to ten asset or hardware fields. Each of these fields returns a value depending on the machine or environment running. The value returned as the result of the sequence field is the first of these fields containing a non-blank value.

    Parameter Description
    Field Sequence

    The sequence of the field.

    Expand the tree on the right and drag a field to the File Name list on the left.

    Ignore Strings

    Used to specify a set of values that are known to be incorrect, fake, or unwanted. These values should be ignored.

    For example, when specifying a MAC address as one of the hardware fields in a sequence, you can designate the known fake MAC addresses in the Ignore Strings so that they can be filtered out.

    A blank field can be defined based on either of the following two criteria:

    • The string matches an ignore string.
    • The length of the field is shorter than the number specified in the Shorter Than field.
    • Matching. A string or a set of strings.

      For example, you can define a set of ignore strings as Unknown;unknown;Not Tested.

      Note The string is case-sensitive; strings must be separated by semicolons (;).

      If the content of the sequence field matches (is equal to) any of the strings specified here, the field is considered to be blank. For example, if the string Not Found is defined here, then a field that has the value Not Found is considered to be blank.

      You can type a string in the form: *STRING*. Here the asterisks (*) are ignored and any string that contains the texts between the two asterisks will also be ignored.

    • Shorter Than. Specifies the minimum length of the string to be considered as non-blank.

      If a field value’s length is shorter than the specified number, then the field is ignored and considered blank.

      Default: Minimum: 1; Maximum: 255

      Note An empty value’s length is 0; an empty field is always ignored.

     

    Combination Fields

    These fields can combine up to five asset or hardware fields into a single field. This is particularly useful for the Description field.

    The combination field is made up by string substitution.

    For a detailed example on setting up a Combination type asset field, see How to Set Up Asset Fields for Data Collection - Example.

    Parameter Description
    Master substitution string

    The template substitution string that makes up the combination field.

    This string replaces the percent values (for example, %1) with the appropriate hardware or asset item.

    Syntax: Use the percentage symbol followed by a number.

    Note You can also specify some text before or after the percent notation which will be a constant part of the value of the field.

    Examples

    • ‘%1 (%2)’
    • If the master substitution string %1 %2MHz %3Mb is defined for the Description field in the asset entry form, where the following index definitions apply:

      Index Field/Description Display
      %1 CPU Data\CPUs\CPU Type CPU Type
      %2 CPU\CPUs\CPU Speed (MHz) CPU SpeedMHz
      %3 Memory Data\Total memory (Mb) Total MemoryMb

      then Description field may look as follows:

      Core i7 2666MHz 3958Mb

    Definitions

    Displays the fields selected from the Fields tree (on the right) to be used in the substitution string.

    The list can contain up to five index entries (represented as %1, %2, %3, %4 and %5).

    <Right-click menu>
    • To insert a field into the Definitions pane, right-click the field in the Fields tree and click Add .
    • To remove a field from the Definitions pane, right-click the field and click Delete .

     

    OS/Scan Fields

    These fields allow the definition of multiple types of data sources to provide an automatic entry depending on the scanner used and the operating system being scanned.

    This type of asset field is useful in situations when you want to scan multiple operating systems but want to collect the same piece of information for each from different sources.

    For example, the data can be extracted from the registry on Windows or from a file on UNIX and Mac OS X.

    Parameter Description

    Field Index

    • The operating system affected by this definition.

    • Drop-down list: Links the operating system to the line numbers of the relevant field in the Fields referred to list.

    Fields Referred to Fields selected from the Fields tree (on the right) to be included in this definition.Can be any existing asset field or any hardware/configuration field (except hardware fields where multiple values may be collected, such as CPU type or IP address).
    Fields tree Displays the available fields.

    Related Topics Link IconRelated Information