The package actions can dynamically refer to changing data with several variables. The use of variables make packages more configurable and simultaneously the portability of packages increases. Variables also offer an interface between Miradore and environmental data, when it is possible to create intelligent packages that are able to adapt their behaviour according to the values of environmental variables. For example, in a case an installation media is needed in Windows environment, you refer to the closest installation point using the variable %MDR_InstPoint% in the parameter fields (e.g. %MDR_InstPoint%\Software\Miradore\Client\2.1.0.0\). In Linux environments, use the following syntax: $MDR_InstPoint (eg. $MDR_InstPoint\Software\Miradore\Client\2.1.0).
There are three different types of variables that are able to be utilized in the packages. The variable types are described in the following table.
Variable type |
Variable identifier |
Description |
Miradore runtime variable |
MDR |
Miradore runtime variables are built-in variables and their value is predefined. Runtime variables can be used inside the Miradore instance. |
Miradore instance variable |
MDI |
Miradore instance variables have the same scope as runtime variables but they can be created from the System settings. |
Miradore package variable |
MDP |
Miradore package variables are package specific variables that can be used only in the same package where they were created. |
The built-in variables and their data sources are explained in the following table.
Miradore runtime variables
Windows variables |
Linux variables |
Data source |
Description |
%MDR_ActionSet% |
|
Actionset file name from system settings table. |
|
%MDR_ActionSetVersion% |
|
Actionset version from System settings table. |
|
%MDR_AdminGroups% |
$MDR_AdminGroups |
Default admin groups for this device from the device document, delimited by semicolon (;). |
Used for example to set current admin groups with a package. |
%MDR_DefaultGateway% |
$MDR_DefaultGateway |
Asset. |
Asset's default gateway if not using DHCP. |
%MDR_DeviceRole% |
$MDR_DeviceRole |
Device role from device document |
Used to perform device role specific actions on computer, like setting correct admin group. |
%MDR_DeviceUsages% |
$MDR_DeviceUsages |
Device usage(s) from device document delimited by semicolon (;). |
Used in package to run different configurations for different device usages. |
%MDR_DHCP% |
$MDR_DHCP |
Asset. |
Asset uses DHCP (1=Yes, 2=No) |
%MDR_DNSServers% |
$MDR_DNSServers |
Asset. |
DNS servers of the asset, separated with a comma, if not using DHCP. |
%MDR_HWCategory% |
$MDR_HWCategory |
Hardware category from the device document. |
Used to perform hardware category specific actions (like laptop configurations). |
%MDR_HWModel% |
$MDR_HWModel |
Asset. |
Hardware model of the asset configuration item. |
%MDR_InstPoint% |
$MDR_InstPoint |
Installationpoint (\\server\share) selected based on target computer's subnet. |
Used to point dynamically into media or package files at closest installationpoint, like: %installationpoint%\Software\Adobe\Reader\8.0.1\setup.exe %installationpoint%\Packages\Adobe_Reader_8.0.1\1\setup.iss |
%MDR_Licensee% |
$MDR_Licensee |
Software licensee information from the asset item page, if not defined the value is taken from managed software form. |
Used to automate software registrations/licensing in packages, so to create common packages but with personal licenses. |
%MDR_LicenseKey% |
$MDR_LicenseKey |
Software license key from the asset item page, if not defined the value is taken from managed software form. |
Used to automate software registrations/licensing in packages, so to create common packages but with personal licenses. |
%MDR_Location% |
$MDR_Location |
Location full name. Resolved by going up the location path from computer's location until one is defined. |
This variable equals to the full name of the asset's location. |
%MDR_LocSN% |
$MDR_LocSN |
Location short name. Resolved going up the location path from computer's location until one is defined. |
Used to perform location specific actions on computer, like moving to correct organisation unit in Active Directory. |
%MDR_MediaFolder% |
$MDR_MediaFolder |
Media path from managed software form. |
Used to point into installation media without typing the path every time. |
%MDR_Organisation% |
$MDR_Organisation |
Asset. |
Name of the organisation to which the asset is assigned to. |
%MDR_OrgSN% |
$MDR_OrgSN |
Organisation shortname. Resolved going up the organisation path from computer's organisation until one is defined. |
Used to perform organisation specific actions on computer, like moving to correct organisation unit in Active Directory. |
%MDR_OSType% |
$MDR_OSType |
Assets’s operating system’s type. Resolved by Miradore client. |
Used to identify the type of the operating system. Possible values are:
|
%MDR_OSVer% |
$MDR_OSVer |
Asset's operating system version. Resolved by Miradore client. |
Used to identify the operating system version. Possible values are:
|
%MDR_PackageFolder% |
$MDR_PackageFolder |
Package. |
Package folder if determined. |
%MDR_PackageName% |
$MDR_PackageName |
Package. |
Package name. |
%MDR_PackageVersion% |
$MDR_PackageVersion |
Package. |
Package version. |
%MDR_SPVer% |
$MDR_SPVer |
Assets’s operating system’s service pack version. Resolved by Miradore client. |
Used to identify the installed service pack version. 0 means that no service pack is installed. |
%MDR_StaticIPAddress% |
$MDR_StaticIPAddress |
Asset. |
Includes the asset's static IP-address if it is set. |
%MDR_SubnetMask% |
$MDR_SubnetMask |
Asset. |
Asset's subnet mask if not using DHCP. |
%MDR_TimeZone% |
$MDR_TimeZone |
Asset time zone information from asset item page. |
Used for example in utility packages to set current time zone at computer end. |
%MDR_WindowsUID% |
$MDR_WindowsUID |
Asset responsible person's UserID from the asset item page. |
Used to run user specific actions, like adding responsible user into local admin group. |
%MDI_LogFolder% |
$MDI_LogFolder |
Manual. Value of the variable is configurable at Administration > System settings > Main > Installations management > Package variables. |
Common folder for logs. Default value: %temp%\MD_LogFolder |
%MDI_ShortcutFolder% |
$MDI_ShortcutFolder |
Manual. Value of the variable is configurable at Administration > System settings > Main > Installations management > Package variables. |
Common folder for shortcuts. Default value: %allusersprofile%\Start menu |