Custom Data (Windows Modern)

You can collect custom data about a Windows Modern device and display it on the Device Details tab in the Device Information panel. Use the Custom Data dialog box to create, modify, or delete custom data items.

Override Settings Inherited from Parent Group 'device group name' Turn on to ignore settings inherited from parent device groups.

This option displays only in nested device groups.

Apply changes to all child groups and devices Turn on to cascade settings specified here to all nested devices and device groups.

Turn on Enable Custom Data Configuration.

Custom Data Configuration

The Custom Definitions section lists all the available custom data items.

Custom Data Configuration window

Beside the name of an existing definition, select More to Edit, set Permissions for, or Delete a custom data item.

To add a new custom data definition, select Add. The Definition Info form opens.

Custom Definitions

Use the Definition Info dialog to define new custom data items.

Definition Info window

Name Enter the name you want to give this custom data item. This is the display name for the custom data item in the Device Information panel.
Build Type Select a build type for the custom data from the list.

Once you have selected a build type, the Definition Info section updates to show options specific to your selection. Here, you can define the expression used to extract the custom data from the device.

Data Type The default setting is STRING. Set this field only when collecting custom data.
Description Enter a brief note describing the nature and purpose of the custom data query.

Build Type: Text File

Display a line from a text file located on the device.

Text File Enter the full path of the text file on the device.
Line Number Enter the line number in the text file.

Example:

The following example returns the text from Line Number one of Text File testfile.txt.

Text file example

Build Type: Registry

Display a key value from the device's registry.
Note: Supported values are REG_SZ and REG_DWORD.
Registry Hive Enter the registry hive.
Key Path Enter the path of the registry key with the value to display.
Value Name Enter the name of the registry value to display.
Example:

The following example returns the registry value for Value Name under the specified Key Path in the named Registry Hive.

Registry example

Build Type: INI File

Display the value associated with a given section and property name in an INI file on the device.

INI File Name Enter the full path of the INI file on the device.
Section Name Enter the name of the section with the property value to display.
Value Name Enter the property name whose associated value is to display.
Example:

INI example

Build Type: Exit Code

Display the exit code returned by an executable program on the device.

CAUTION: Commands execute with administrator privileges on the underlying operating system.
Exit Code Enter the full path of the executable program on the device whose exit code you want displayed.

If a path is not provided, SOTI MobiControl looks for the program name in default paths, such as C:\WINDOWS\system32.

CAUTION: Commands execute with administrator privileges on the underlying operating system.
Exit codes:
  • 0 indicates successful execution.
  • 1 indicates PowerShell or cmd.exe opened successfully, but the path or file is not found.
  • -1 indicates the path or file is not found.
  • 259 indicates the process is still active as a new process invokes.
Examples:
Run a batch file c:\test directory\test.bat

Sample value returned: 0

Exit code 0 indicates successful execution.

Run a PowerShell script powershell.exe c:\test\pw1.ps1

Sample value returned: 1

Exit code 1 indicates PowerShell opened successfully, but the path or file is not found.

Execute a file c:\test\test.xyz

Sample value returned: –1

Exit code –1 indicates the file is not found.

Open and run PowerShell powershell.exe

Sample value returned: 259

Exit code 259 indicates the process is still active as a new process invokes.

Build Type: STDOUT

Display the first line of standard output from an executable program on the device.

CAUTION: Commands execute with administrator privileges on the underlying operating system.
STDOUT Enter the full path of the executable program on the device to capture the first line of standard output it displays.

If a full path to programs such as powershell.exe and cmd.exe is not provided, SOTI MobiControl defaults to the 32-bit versions of those programs. The following examples show STDOUT commands used to invoke 32-bit or 64-bit programs.

Run DOS commands in 32-bit cmd.exe
Run DOS commands in 64-bit c:\windows\sysnative\cmd.exe
Run PowerShell commands in 32-bit powershell.exe
Run PowerShell commands in 64-bit C:\windows\sysnative\windowspowershell\v1.0\powershell.exe
Note: If you specify powershell.exe without providing a full path, the command defaults to powershell.exe 32-bit.
Use a 32-bit native Windows executable (for example, manage-bde) cmd.exe /c c:\windows\sysnative\manage-bde.exe -status | Findstr Method

Or

powershell.exe c:\windows\sysnative\manage-bde.exe -status | Findstr Method
Use a 64-bit native Windows executable (for example, manage-bde) c:\windows\sysnative\cmd.exe /c manage-bde -status | Findstr Conversion

Or

c:\windows\sysnative\windowspowershell\v1.0\powershell.exe manage-bde -status | Findstr Conversion
Note: If you specify cmd.exe or powershell.exe without providing a full path, the command defaults to the 32-bit version.
The following table shows examples of standard output values returned by commands executed under STDOUT.
Check that the program files environment uses the 32-bit command prompt cmd.exe /c echo %programfiles%

Sample value returned: C:\Program Files (x86)

Check that the program files environment uses the 32-bit command prompt C:\windows\sysnative\cmd.exe /c echo %programfiles%

Sample value returned: C:\Program Files

Check that PowerShell is a 32-bit process.

powershell.exe [Environment]::Is64BitProcess

Sample value returned: False

False means it is a 32-bit process.
Check that PowerShell is a 64-bit process.

c:\windows\sysnative\windowspowershell\v1.0\powershell.exe [Environment]::Is64BitProcess

Sample value returned: False

True means it is a 64-bit process.

Build Type: Static

Display information about the device that is statically set. The device has the value assigned rather than pulling it from a device attribute.

Note: Not available on Android Plus or Linux devices.
Static Enter a static value that provides information about the device.

Example:

OwnerName="X & Y Corporation, SalesDepartment"