Setting variables for all templates

Use the Public variables toolbar button to view and set global variables that apply to all provisioning templates. Such variables are used to customize template file names to copy, paths to install to, or IP addresses to export files from. User variables (variables that apply to only one template) take precedence over public variables.

To set public user-defined variables
  1. Click Tools > Distribution > OS Deployment.
  2. On the toolbar, click the Public variables button.
  3. Click Add.
  4. Type the value to be replaced in the Search value box (for example, CoreIP).
  5. Type the new value in the Replacement value box. For example, if the Search value is CoreIP, type the IP address you want to replace CoreIP with.
  6. Select the type.
  7. NOTE: Use quotation marks around names with spaces. Most values from the Inventory database can be used.

  8. Click OK.

Database lookups are handled by adding a ldbnf: prefix to the Replace value. The database table and key pair can then be used to look up a specific entry in the database. The ldDeviceID public variable that is configured by default is an example of how to add a database lookup variable.

Creating unique identifiers for new devices 

To create unique identifiers for new devices, use a Public variable that is based on the MAC address of the target device as shown below:

Variable (Database) = macAddress Value = Computer.Network."NIC Address"
Variable (String) = Prefix Value = UT (User value like location - Optional)
Variable (String) = Suffix Value = XP (User value like OS - Optional)
Variable (String) = ComputerName Value = %Prefix%%MACaddr%%Suffix%

Next, use the ComputerName variable in your sysprep.inf or unattend.txt files to uniquely identify the new device, as shown in the following code sample:

[UserData]

ProductKey=%ProductKey%

FullName="Engineering"

OrgName="LANDesk"

ComputerName=%ComputerName%