User Defined Fields

From systemhoundwiki

Contents

User Defined Fields

User defined fields enable you to input your own information into systemhound and view this on the detailed hardware reports. This information could be anything; examples are the location or department of the pc, a serial number or asset id or anything that you wish to see in a particular machine’s hardware report. An unlimited number of fields can be defined, with the information being derived from a file or from a registry entry on each machine. WMI is also supported through the use of WQL queries enabling custom system information to be retrieved. Custom fields are entered within the central configuration tool.

Figure 2: example of user defined fields. This information is viewed in the detailed hardware report for the machine


Note: To use custom defined fields you will need to right-click on 'custom field reporting' and select 'add job' within the Central Configuration tool. Follow the steps below to then configure the custom fields you require.

Capturing user defined information from an initialization file

For this example, you can create a file called pcinfo.txt in your WINNT folder on your Windows 2000 computers. It should have the following format, as shown below.

The INI section headings are required and enable you to structure your user defined information. The headings do not appear on the reports.

1. In the Central Configuration Tool, select the Operating System, Windows 2000 in this case.

2. Right click on Custom Field Reporting under Custom Computer Details and choose New Job.

3. In the right hand window, click on Add.

4. Select Initialisation File (selected by default).

5. Enter the details as shown in Fig 3. Environment variables such as %WINDIR%, %PROGRAMFILES%, %SYSTEMROOT% are supported or enter a specific location such as C:\WINNT\pcinfo.txt.

Note: The environment variable must be available to the systemhound scheduler service which runs under the service account. But by using ’standard’ environment variables you can write support different installation folders.

Environment Variable Description
%programfiles%
Program Files directory on local drive.
%systemdrive% The system drive which windows is running from e.g. C:\
%windir% The windows folder (e.g. c:\windows)

6. Click OK and repeat these steps for every user-defined entry you want reported.

7. Then save your configuration changes by clicking on File\Save.

8. The changes will be sent to client machines at the next upload session, and will take effect at the next scheduled data collection interval. To see the custom information, click on the detailed hardware report for an individual pc.

Note: To test this immediately, run shrefresh.exe. This exe is in Program Files\systemhound\Utils\Refresh on the systemhound server and client machine.

Note: The user defined fields support wildcards. For example if it was set to read the INI file C*.adp, it would find C1196.adp. It reads from the first match it finds.

Figure 3: inputting user defined information via an ini file

Capturing custom information using WMI

This example shows how to configure systemhound to report local user accounts on a machine through the use of WMI. Querying WMI data within systemhound is achieved through writing WQL queries. Please refer to the Microsoft developer site for more detail on WQL.

Unlike standard WQL, systemhound WQL supports environment variables. For example:

Will return all the local user accounts configured on the machine. The keyword TOP is also supported by the software to limit the rows returned – this is extremely useful to reduce the result set returned by some WQL queries. The example below will return only the first 2 fields.

Whilst developing your WQL query, you may click on ’execute query’ to test the query and view the results.

Capturing user defined information from the registry

This example shows how to configure systemhound to capture information defined within the registry, in this case whether filenames with an 8.3 format have been disabled or not.

1. In the Central Configuration Tool, select the Operating System, Windows 2000 in this case.

2. Right click on Custom Computer Details and choose New Job.

3. In the right hand window, click on Add.

4. Select Registry Entry.

5. If the registry entry we want is located at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\NtfsDisable8dot3NameCreation. In the Hive drop down list, select HKLM (the hive corresponds to each of the main registry classes) and in the Key field, enter SYSTEM\CurrentControlSet\Control\FileSystem\. In Field, enter NtfsDisable8dot3NameCreation. In the Reporting Field Name, enter a description for this custom information.

6. Click OK.

7. Repeat these steps for every registry entry you want reported. If you wish to select a default value from the registry enter a @ into the field box.

8. Then save your configuration changes by clicking on File->Save.

9. The changes will be sent to client machines at the next upload session, and will take effect at the next scheduled data collection interval. To see the custom information, click on the detailed hardware report for an individual pc.

Figure 4: inputing user defined information via a registry entry

User defined fields can also be edited and deleted (as shown below). Highlight the entry you want and select Edit or Remove. All changes must be saved to take effect.

Note: The user defined fields need to be entered for each Operating System present on your network that you want to collect information from. To copy these fields across to other Operating Systems quickly (from Windows 2000 to XP for example), save any changes to the Central Configuration, go to Program Files\systemhound\Release\Windows2000\Plugins and copy the file custinfo2.dat to Program Files\systemhound\Release\WindowsXP\Plugins.
Note: By default the polling interval for Custom Information is set to run every 7 days but you can change this to whatever suits you. If the information you are retrieving does not change very often, you may wish to leave it at 7 days.

Adding user defined information to the Hardware Summary Report [Masterfields]

By giving one the custom fields the name of MasterField it will feed into the master hardware summary as an additional column. Only one custom field can be configured to appear on the hardware summary page. All custom fields will appear within the hardware detail page.

Views