Common Conditions
See also: Network Conditions or System Conditions
The following "common" conditions are available:
- %Var%='value' (Compare strings)
Checks if a DSM variable or an environment variable has the specified value. - AskUser (Simple question message box)
Displays a dialog box containing text and a Yes and No button. The condition is true if you click Yes. - CheckInstallMode (Check for installation or execution mode)
Checks the mode the current installation is executed with.
The following modes are available:- Installation mode: user portion or computer portion
- Execution mode: repair, reinstallation, modification, update, uninstallation
Due to compatibility with older scripts, a check for reinstallation will also return "true" if the actual execution mode is modification or update.
In a script with more than one CheckInstallMode, make sure to check for modification or update before checking for reinstallation.
You can change the default behavior in the configuration table in the setting Treat Update and Modification as Reinstallation.
- CheckPlatform (Check OS version)
Checks if the operating system and the type of computer correspond to the specified value. - ExistIcon... (Existence of an icon)
Checks if a certain icon is already existing in the Program Manager. - HasComputerAssociatedUser
Checks if a computer has at least one associated user. - HasComputerOtherAssociatedUser
Checks if the computer has at least one associated user except for the current user. - IsCurrentUserAssociatedUser
Checks if the current user is the user associated to the computer. - IsDlgOk (Most recent dialog closed with OK)
Checks if the last multiple choice dialog (MultipleChoice...) was finished by clicking OK.
(Use NOT IsDlgOk, to check the last termination.) - IsInTimeFrame (Active timeframe)
Checks if the current computer is within a timeframe. The respective timeframe is entered as DSM variable type timeframe.
Apart from the predefined maintenance timeframes, you can also use user-defined variables, schema extensions or installation parameters of the timeframe type.
Examples:
Predefined maintenance timeframe - %CurrentComputer.Var.SystemMaintenance.Schedule%
User-defined timeframe for patch installations - %CurrentComputer.Var.UserDefGroup.PatchTimeFrame% - IsLaptop (Computer defined as laptop)
Checks if a computer is defined as laptop. - IsRebootPending(Policy instance)
Checks if there is at least one policy instance set to PendingReboot. - IsRestartFlagSet (System restart necessary)
Checks if a system restart flag was set using the command InstallFileList. With the command ClearRestartFlags a system restart flag can be deleted. - IsRunningOnServerOS (Computer with server OS)
Checks, if a server OS is running on the computer. - IsRunningOnX64 (Computer with 64bit OS)
Checks, if a 64bit OS is running on the computer. - IsSwPackageRevInstalled (Executed installation of a package)
Checks if the selected package has been executed already. You can define a specific revision. - IsTestWorkstation (Computer defined as test computer)
Checks if a computer is defined as test computer. - IsTrue
(Parameter)
Checks if the expression (parameter) is logically true (e.g. "8 > 5"). The logical expressions in this condition are resolved like they are in variables; for more information, see chapter Resolution of Logical Expressions in Variables - LineExists (Existence of a line)
Checks whether a specific line exists in the specified file. Wildcards can be used also.
Moreover, it can be selected whether on 64-bit computers the 64-bit branch of the system folder should be used or not. - ModifyDone (Modify operation executed)
Checks a specific file was modified with ModifyINI or ModifyOEM. - NetOK (No network error occurred)
Checks if the last NetUse or NetDisconnect was successful. - RunningAsService ((Running as service)
Checks if the current installation project is executed by the DSM Runtime Service. - RunningInCitrixSession (Installer is running in a Citrix TS session)
Checks if the current installation project is executed during a Citrix TS session. - RunningInWTSSession (Installer is running in a WTS session)
Checks if the current installation project is executed during a WTS session. - RunningOnCitrixServer (Installer is running on Citrix Terminal Server)
Checks if the current installation project is executed on a Citrix Terminal Server independently of user sessions.