Chat now with support
Chat with Support

NOTICE! We are upgrading our support telephone services, implementing Genesys, starting the week of May 19, 2025

KACE Desktop Authority 11.2.1 - Reporting Guide

What are Dynamic Variables?

A Dynamic Variable represents an area in memory that is reserved to hold a specific value. The value of the variable is dynamic in that the value will differ based on the current user. These variables are used to hold temporary values during the execution of a logon or custom script. All Desktop Authority dynamic variables are prefixed with a dollar ($) sign. The rules for defining new dynamic variables follow the KiXtart guidelines. More information on KiXtart can be found at www.kixtart.org/.

There are two categories of Dynamic Variables: Predefined and Custom. Predefined dynamic variables are ones that are defined by Desktop Authority. Custom Scripts may override the value of these variables. Desktop Authority can also make use of User Defined Custom dynamic variables.

Predefined dynamic variables

In the Desktop Authority Manager, predefined dynamic variables are used to aid in the creation of configuration elements. The great thing about these variables is that since their values change based on the current user/computer, a single configuration entry can be used for all users/computers. You can be assured that at runtime when the logon script is executed, the predefined dynamic variable will contain the documented value based on the current user/computer.

For example, the predefined dynamic variable $UserId can be used to denote the logon id of the current user. At runtime when the logon script is executed, the $UserId variable will contain the UserID of the user currently logging on to the network.

Dynamic variables can be used throughout the Manager by typing the name of the variable into the desired field or by pressing the F2 key when the cursor is in any entry box. Pressing F2 will display a dialog box similar to the following, allowing the selection of a predefined variable from a visual list.

To select a variable, select it in the list and click Insert or double-click the variable. The selected variable will be inserted into the field at the current cursor position. Click the Info link at the right side of the list to get more information about a dynamic variable.

Dynamic variables can also be used in custom scripts. When writing a custom script there is no popup list of valid predefined dynamic variables.

Click here for a complete list of predefined variables.

Example usage:

One of the most commonly used places for using Predefined Dynamic Variables is in the Drive mappings object. Use the $HomeServer and $HomeDir variables to map a home drive for your users.

Figure 20: Example usage of Dynamic Variable

Custom dynamic variables

Custom Dynamic Variables can be pre-defined for use in the Manager as well as in Custom Scripts. To use your custom dynamic variables in the Manager, simply add the variable definition to the Definitions tab of either the Global Options or the Profile dialogs. Defining a variable within Global Options makes the variable available everywhere, regardless of which profiles are processed on the client. Variables defined in the profile’s Definitions tab are available only if the profile in which the variable is defined is processed on the client. To add a custom variable, simply click Edit on the Definitions tab.

Example usage:

Instead of using the internal dynamic variable for the wallpaper file, a custom Dynamic Variable can be created. Modify either the Global Options or Profile Definitions file. Add a new custom variable called $customwallpaper. Other code can be wrapped around this definition to determine which group (department) the user belongs to. On the Display object, enter $customwallpaper in the Wallpaper file box. When the logon script is executed, the $customwallpaper variable is evaluated and set for each user.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating