Conditions Reference
Select version:


Refer to the Getting Started Guide for information on how to use conditions.
Active Directory Computers

If [Not] ComputerEnabled <ComputerName> Then

Tests if specified Active Directory computer account is enabled. If no computername is specified, executing computer is assumed. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<ComputerName>.
Example: If ComputerEnabled Acme0334 Then

If [Not] ComputerExists <ComputerName> Then

Tests if specified Active Directory computer account exists. If no computername is specified, executing computer is assumed. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<ComputerName>.
Example: If ComputerExists Acme0334 Then
Active Directory Groups

If [Not] ComputerIsMemberOf <GroupName> Then
If [Not] ComputerIsMemberOf <GroupName>, <ComputerName> Then

Tests if the computer is member of the Active Directory group or any nested sub group. A nested group is for instance when a computer is member of 'Sales Florida Computers' and 'Sales Florida Computers' is a member of 'Sales America Computers', then the computer is also implicitly a member of 'Sales America Computers' and the condition is true for both. If no computer is specified, the executing computer is assumed. If domain is different than the current users' domain, specifying as <Domain>\<GroupName> and <Domain>\<ComputerName>.
Example: If ComputerIsMemberOf Acme Sales Computers Then ConnectShare J:,\\AcmeServer\SalesShare

If [Not] GroupExists <GroupName> Then

Tests if specified Active Directory group exists. If domain is different than the domain of the executing user, specify group as <Domain>\<GroupName>.
Example: If GroupExists AcmeGroup Then

If [Not] GroupIsMemberOf <GroupName>, <GroupName> Then

Tests if the first Active Directory group is member of the second Active Directory group or any nested sub group. If domain is different than the current users' domain, specifying domain group as <Domain>\<GroupName>.
Example: If GroupIsMemberOf Acme Sales Florida Users,Acme Sales Users Then

If [Not] UserIsMemberOf <DomainGroupName> Then
If [Not] UserIsMemberOf <DomainGroupName>, <UserName> Then

Tests if the user is a member of the specified Active Directory group directly or through nested groups. A nested group is for instance when a user is member of 'Sales Florida Users' and 'Sales Florida Users' is a member of 'Sales America Users', then the user is also implicitly a member of 'Sales America Users' and the condition is true for both. If no user is specified, the currently logged on user is assumed. If domain is different than the current users' domain, specify user as <Domain>\<UserName>.
Example: If UserIsMemberOf SalesStaff Then ConnectShare J:,\\AcmeServer\SalesShare
Active Directory OU

If [Not] ComputerIsInOU <OU Name> Then
If [Not] ComputerIsInOU <OU Name>, <ComputerName> Then

Tests if the computer is in the Organizational Unit in the Active Directory or any Organizational Unit below. If the command DisableOURecursion has been issues, the condition does not look in sub-OUs. If computername is not specified, the executing computer is assumed. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<ComputerName>.
Example: If ComputerIsInOU ShopComputers Then ConnectShare J:,\\AcmeServer\ShopShare

If [Not] GroupIsInOU <GroupName>, <OUName> Then

Tests if the group is in the Organizational Unit in the Active Directory or any Organizational Unit below. If the command DisableOURecursion has been issues, the condition does not look in sub-OUs. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<GroupName>.

If [Not] OUExists <OUName> Then

Tests if specified Active Directory organizational unit exists. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<OUName>.
Example: If Not OUExists Acme Sales America Then CreateOU Acme Sales America,Acme Sales Global

If [Not] OUIsInOU <OUName>, <OUName> Then

Tests if the Organizational Unit (first parameter) is in the Organizational Unit (second parameter) in the Active Directory or any Organizational Unit below. If the command DisableOURecursion has been issues, the condition does not look in sub-OUs. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<GroupName>.

If [Not] UserIsInOU <OU Name> Then
If [Not] UserIsInOU <OU Name>, <UserName> Then

Tests if the user is a in the Organizational Unit from the Active Directory or any Organizational Unit below. If the command DisableOURecursion has been issues, the condition does not look in sub-OUs. If not username is specified, current user is assumed. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserIsInOU SalesStaff Then ConnectShare J:,\\AcmeServer\SalesShare
Active Directory Users

If [Not] UserCanChangePassword Then
If [Not] UserCanChangePassword <UserName> Then

Tests if specified Active Directory user can change password. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserCanChangePassword Then

If [Not] UserEnabled <UserName> Then

Tests if specified Active Directory user account is enabled. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserEnabled AcmeUser Then

If [Not] UserExists <UserName> Then

Tests if specified Active Directory user account exists. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserExists AcmeUser Then

If [Not] UserExpiresSoon Then
If [Not] UserExpiresSoon <Days> Then
If [Not] UserExpiresSoon <Days>, <UserName> Then

Tests if specified Active Directory user account expires within the next 'Days' number of days. If no 'Days' is specified, 7 days is assumed. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserExpiresSoon Then ShowMessage "Your account will expire with a week. Please contact your system administrator, if you need an extension."

If [Not] UserHasPasswordExpiry Then
If [Not] UserHasPasswordExpiry <UserName> Then

Tests if specified Active Directory user's password can expire. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserHasPasswordExpiry Then

If [Not] UserIsAdmin Then

Tests if current user is a domain administrator. Use UserIsLocalAdmin to test for local administrator.
Example: If UserIsAdmin Then

If [Not] UserIsInDomain Then

Tests if the current user is a domain user.
Example: If UserIsInDomain Then

If [Not] UserIsLocalAdmin Then
If [Not] UserIsLocalAdmin <UserName> Then

Tests if current user is local administrator. Use UserIsAdmin to test for domain administrator. If no user is specified, the currently logged on user is assumed. If domain is different than the current users' domain, specify user as <Domain>\<UserName>.
Example: If UserIsLocalAdmin Then

If [Not] UserMustChangePassword Then
If [Not] UserMustChangePassword <UserName> Then

Tests if specified Active Directory user is forced to change password at next logon. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserMustChangePassword Then

If [Not] UserMustChangePasswordSoon Then
If [Not] UserMustChangePasswordSoon <Days> Then
If [Not] UserMustChangePasswordSoon <Days>, <UserName> Then

Tests if specified Active Directory user is forced to change password within the next 'Days' number of days. If no 'Days' is specified, 7 days is assumed. Useful to detect when the user password will expire soon. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserMustChangePasswordSoon Then ShowMessage "Your password will expire with a week. Please change your password or log out within the next week."

If [Not] UserProfileIsRoaming Then
If [Not] UserProfileIsRoaming <UserName> Then

Tests if the users is roaming its profile. If no username is specified, current user is assumed. Domain is by default the domain of the logged on user, to specify another domain, use <Domain>\<UserName>.
Example: If UserProfileIsRoaming Then
COM Automation

If [Not] ObjectExists <COMInterface> Then

Determines if the specified COM object or COM server exists. Useful for determining if an object exists before using CreateObject.
Example: If ObjectExists Excel.Application Then ShowMessage You have excel version [ObjectValue CreateObject(Excel.Application).Version]
Custom Collections

If [Not] CollectionContains <CollectionName>, <SearchItem> Then

Tests if the search item is present in the collection. If the collection does not exist, the condition is false.
Example: If Not CollectionContains [UserName] Then Exit

If [Not] CollectionIsEmpty <CollectionName> Then

Tests if a custom collection is empty. If the collection does not exist, the condition is false.
Example: If CollectionIsEmpty MyUsers Then Exit
Directories

If [Not] DirectoryExists <Path> Then

Tests if specified directory exists.
Example: If Not DirectoryExists [UserDocumentsDir]\AcmeFiles Then MakeDir [UserDocumentsDir]\AcmeFiles
Execution

If [Not] HasFailed Then

Tests if the current script has failed at least once. The script must be in error-resume mode to be executing at all after an error occurs, either by using the /IE command-line switch or the ResumeOnError command.
Example: If HasFailed Then ShowMessage "The script has failed:[Return][Return][LastError]",Execution error

If [Not] LastLineFailed Then

Tests if the previous non-empty script line failed. Useful for showing custom errors to users, when certain operations fail. The script must be in error-resume mode to be executing at all after an error occurs, either by using the /IE command-line switch or the ResumeOnError command.
Example: If LastLineFailed Then ShowMessage There was a problem backing up your personal files. Please contact your administrator,Backup error

If [Not] ScriptIsElevated Then

Determines if the executing user is running in an elevated User Account Control state. If UAC is not enabled, the condition returns whether or not the executing user is local administrator.
Example: If Not ScriptIsElevated Then Exit

If [Not] UACEnabled Then

Determines if User Account Control (UAC) is enabled.
Example: If UACEnabled Then Exit
Files

If [Not] FileExists <File> Then

Tests if specified file exists.
Example: If FileExists [UserHomeDir]\DocumentsBackup.zip Then UnZip [UserHomeDir]\DocumentsBackup.zip,[UserDocumentsDir]\Restore

If [Not] FileIs32Bit <File> Then

Tests if specified file is 32 bit or not. If the file does not have execution bit information, the condition is false.

If [Not] FileIs64Bit <File> Then

Tests if specified execution file is 64 bit or not. If the file does not have execution bit information, the condition is false.

If [Not] FileIsTrusted <File> Then

Tests if specified file is authenticode trusted.
Graphical User Interfaces

If [Not] Ask <Message> Then
If [Not] Ask <Message>, <HeaderText> Then
If [Not] Ask <Message>, <HeaderText>, <IconName> Then
If [Not] Ask <Message>, <HeaderText>, <IconName>, <YesButtonText>, <NoButtonText> Then

Asks for message and enters the loop is answer is positive. You can use [Return] function to make the message appear in multiple lines. IconName refers to an internal icon name of icons listed in the "Icon Explorer" in the script editor. Further icons can added with the AddCustomIcon command. You also point directly to an image file preferably by in png format and the size must be 64x64 pixels or less.
Example: If Ask "Do you want to empty your recycle bin?" Then EmptyRecycleBin

If [Not] AskWin <Message> Then
If [Not] AskWin <Message>, <HeaderText> Then

Asks for message in regular Windows style and enters the loop is the answer is positive. You can use [Return] function to make the message appear in multiple lines.
Example: If AskWin "Do you want to empty your recycle bin?" Then EmptyRecycleBin
Hardware

If [Not] Desktop Then

Tests if the computer is a desktop (assumed if there are no batteries).
Example: If Not Desktop Then SyncDir [UserDocumentsDir],[UserHomeDir]\DocumentsBackup

If [Not] Portable Then

Tests if the computer is a portable (assumed if there is a battery).
Example: If Portable Then SyncDir [UserDocumentsDir],[UserHomeDir]\DocumentsBackup

If [Not] RunningOnBatteries Then

Tests if the computer is running on batteries (not plugged into A/C).
Example: If Not RunningOnBatteries Then RunScript \\AcmeServer\Installers$\Office2007\Install.fsh,Acme\Installer,<EncryptedPassword>
Installations - Internal

If [Not] Installed <ApplicationName> Then

Tests if the specified FastTrack scripted application is installed.
Example: If Installed Microsoft Office Then WriteRegistry HKCU\Software\Microsoft\Office\Common\UserInfo\Company,Acme Corp

If [Not] InstalledBuild <ApplicationName>, <Build> Then

Tests if the specified application is installed in the specific build.
Example: If InstalledBuild Microsoft Office,3 Then WriteRegistry HKCU\Software\Microsoft\Office\Common\UserInfo\Company,Acme Corp

If [Not] InstalledVersion <ApplicationName>, <Version> Then

Tests if the specified application is installed in the specific version.
Example: If InstalledVersion Microsoft Office,2007 Then WriteRegistry HKCU\Software\Microsoft\Office\Common\UserInfo\Company,Acme Corp

If [Not] UserSettingsOnce <ApplicationName> Then

Only true once per user on a machine that has a registered installation (RegisterInstallation command). Used to set the user settings part for installations.
Example: If UserSettingsOnce Microsoft Office Then Include Settings\OfficeSettings.fsh

If [Not] UserSettingsOnceABuild <ApplicationName> Then

True once every time the build number installed (RegisterInstallation command) is different than the build number when user settings was applied last time or user settings have never been applied. Always false if the application is not installed.
Example: If UserSettingsOnceABuild Microsoft Office Then Include Settings\OfficeSettings.fsh

If [Not] UserSettingsOnceAVersion <ApplicationName> Then

True once every time the version number installed (RegisterInstallation command) is different than the version number when user settings was applied last time or user settings have never been applied. Always false if the application is not installed.
Example: If UserSettingsOnceAVersion Microsoft Office Then Include Settings\OfficeSettings.fsh
Installations - Windows

If [Not] ProgramInstalled <ProgramName> Then

Tests if the specified program is installed and shown in the Windows installed programs list. Program names can be found in the installed programs list in the control panel or on your FastTrack Inventory website, if you use inventory. You can specify the-most left part, but the full name must be preferred. Some programs like Adobe Reader postfixes the version number in the application name, in which case, this can easily be factored out using "Adobe Reader" as program name. However using for example "Microsoft Office" instead of the full program name to detect an office installation is not a good idea, because you can get a positive unintentional hit on "Microsoft Office Outlook Connector" for example. As a general rule of thumb, use the longest possible left-most part.
Example: If ProgramInstalled Microsoft Office Standard 2010 Then

If [Not] ProgramIs32Bit <ProgramName> Then

Tests if the specified program is installed, shown in the Windows installed programs list and is a 32-bit installation. If the program is not installed, the condition is false; use ProgramInstalled to test whether the program is installed at all. Program names can be found in the installed programs list in the control panel or on your FastTrack Inventory website, if you use inventory. You can specify the-most left part, but the full name must be preferred. Some programs like Adobe Reader postfixes the version number in the application name, in which case, this can easily be factored out using "Adobe Reader" as program name. However using for example "Microsoft Office" instead of the full program name to detect an office installation is not a good idea, because you can get a positive unintentional hit on "Microsoft Office Outlook Connector" for example. As a general rule of thumb, use the longest possible left-most part.
Example: If ProgramIs32Bit Microsoft Office Standard 2010 Then

If [Not] ProgramIs64Bit <ProgramName> Then

Tests if the specified program is installed, shown in the Windows installed programs list and is a 64-bit installation. If the program is not installed, the condition is false; use ProgramInstalled to test whether the program is installed at all. Program names can be found in the installed programs list in the control panel or on your FastTrack Inventory website, if you use inventory. You can specify the-most left part, but the full name must be preferred. Some programs like Adobe Reader postfixes the version number in the application name, in which case, this can easily be factored out using "Adobe Reader" as program name. However using for example "Microsoft Office" instead of the full program name to detect an office installation is not a good idea, because you can get a positive unintentional hit on "Microsoft Office Outlook Connector" for example. As a general rule of thumb, use the longest possible left-most part.
Example: If ProgramIs64Bit Microsoft Office Standard 2010 Then

If [Not] ProgramIsUserInstalled <ProgramName> Then

Tests if the specified program is installed, shown in the Windows installed programs list and is a per-user installation. If the program is not installed, the condition is false; use ProgramInstalled to test whether the program is installed at all. Program names can be found in the installed programs list in the control panel or on your FastTrack Inventory website, if you use inventory. You can specify the-most left part, but the full name must be preferred. Some programs like Adobe Reader postfixes the version number in the application name, in which case, this can easily be factored out using "Adobe Reader" as program name. However using for example "Microsoft Office" instead of the full program name to detect an office installation is not a good idea, because you can get a positive unintentional hit on "Microsoft Office Outlook Connector" for example. As a general rule of thumb, use the longest possible left-most part.
Example: If ProgramIsUserInstalled Microsoft Office Standard 2010 Then

If [Not] UserSettingsProgramOnce <ApplicationName> Then

Same as UserSettingsOnce, except it is for a program listed in Windows installed programs list. You can specify the-most left part, meaning you can use "Microsoft Office" instead of the full name to check for any version.

If [Not] UserSettingsProgramOnceAVersion <ApplicationName> Then

Same as UserSettingsOnceAVersion, except it is for a program listed in Windows installed programs list. You can specify the-most left part, meaning you can use "Microsoft Office" instead of the full name to check for any version.
Intervals

If [Not] Once <GlobalIDKey> Then

True only once for the executing computer, use UserOnce for per-user intervals. A globally unique key must be provided that is not used in any other script. To trigger a re-run on all executing computers, change the globally unique key.
Example: If Once InitialMachineModding Then Include SetupScripts\InitialSetup.fsh

If [Not] OnceADay Then

True only once a day for the machine, which is useful for cleanups; use UserOnceADay for a per-user intervals. If the script is modified, intervals are automatically reset, which means that the condition will automatically be true at next execution.
Example: If OnceADay Then Include DailyCleanup.fsh

If [Not] OnceAMonth Then

True only once a month for the machine, which is useful for cleanups; use UserOnceAMonth for a per-user intervals. If the script is modified, intervals are automatically reset, which means that the condition will automatically be true at next execution.
Example: If OnceAMonth Then Include MonthlyCleanup.fsh

If [Not] OnceAWeek Then

True only once a week for the machine, which is useful for cleanups; use UserOnceAWeek for a per-user intervals. If the script is modified, intervals are automatically reset, which means that the condition will automatically be true at next execution.
Example: If OnceAWeek Then Include WeeklyCleanup.fsh

If [Not] UserOnce <GlobalIDKey> Then

True only once for the current user; useful for for instance welcome information. A globally unique key must be provided that is not used in any other script. To trigger a re-run on all users, change the globally unique key.
Example: If UserOnce ShowWelcome Then ShowWebPage http://intra.acme.com/Welcome,Welcome to Acme

If [Not] UserOnceADay Then

True only once a day for the current user. If the script is modified, intervals are automatically reset, which means that the condition will automatically be true at next execution.
Example: If UserOnceADay Then Include DailyCleanup.fsh

If [Not] UserOnceAMonth Then

True only once a month for the current user. If the script is modified, intervals are automatically reset, which means that the condition will automatically be true at next execution.
Example: If UserOnceAMonth Then Include MonthlyCleanup.fsh

If [Not] UserOnceAWeek Then

True only once a week for the current user. If the script is modified, intervals are automatically reset, which means that the condition will automatically be true at next execution.
Example: If UserOnceAWeek Then Include WeeklyCleanup.fsh
Local Groups

If [Not] ComputerIsLocalMemberOf <DomainComputerName>, <LocalGroupName> Then
If [Not] ComputerIsLocalMemberOf <DomainComputerName>, <LocalGroupName>, <RemoteComputerName> Then

Tests if the domain computer is a member of the local group. If domain is different than the current users' domain, specify group as <Domain>\<GlobalGroupName>.
Example: If ComputerIsLocalMemberOf AcmeMgmt01,Administrators Then

If [Not] GroupIsLocalMemberOf <DomainGroupName>, <LocalGroupName> Then
If [Not] GroupIsLocalMemberOf <DomainGroupName>, <LocalGroupName>, <RemoteComputerName> Then

Tests if the domain group is a member of the local group. If domain is different than the current users' domain, specify group as <Domain>\<GlobalGroupName>.
Example: If GroupIsLocalMemberOf [DomainAdminsGroup],Administrators Then

If [Not] LocalGroupExists <GroupName> Then
If [Not] LocalGroupExists <GroupName>, <RemoteComputerName> Then

Tests if specified local group exists.
Example: If LocalGroupExists AcmeGroup Then

If [Not] LocalUserIsLocalMemberOf <GroupName> Then
If [Not] LocalUserIsLocalMemberOf <GroupName>, <UserName> Then
If [Not] LocalUserIsLocalMemberOf <GroupName>, <UserName>, <RemoteComputerName> Then

Tests if the local user is a member of the local group. If no username is specified, logged on local user is assumed.
Example: If LocalUserIsLocalMemberOf AcmeUser,Administrators Then

If [Not] UserIsLocalMemberOf <GroupName> Then
If [Not] UserIsLocalMemberOf <GroupName>, <UserName> Then
If [Not] UserIsLocalMemberOf <GroupName>, <UserName>, <RemoteComputerName> Then

Tests if the Active Directory user is a member of the local group directly or through nested domain groups inside the local group. A nested membership is for instance when a user is member of Domain Admins and Domain Admins is a member of the local Administrators group, then the user is implicitly a member of Administrators and the conditions is true. If no user is specified, the currently logged on user is assumed. If domain is different than the current users' domain, specify user as <Domain>\<UserName>.
Example: If UserIsLocalMemberOf Administrators Then
Local Users

If [Not] LocalUserCanChangePassword Then
If [Not] LocalUserCanChangePassword <UserName> Then
If [Not] LocalUserCanChangePassword <UserName>, <RemoteComputerName> Then

Tests if specified local user can change password. If no user is specified, locally logged on user is assumed.
Example: If LocalUserCanChangePassword Then

If [Not] LocalUserEnabled <UserName> Then
If [Not] LocalUserEnabled <UserName>, <RemoteComputerName> Then

Tests if specified local user account is enabled.
Example: If LocalUserEnabled AcmeUser Then

If [Not] LocalUserExists <UserName> Then
If [Not] LocalUserExists <UserName>, <RemoteComputerName> Then

Tests if specified local user account exists.
Example: If LocalUserExists AcmeUser Then

If [Not] LocalUserHasPasswordExpiry Then
If [Not] LocalUserHasPasswordExpiry <UserName> Then
If [Not] LocalUserHasPasswordExpiry <UserName>, <RemoteComputerName> Then

Tests if specified local user's password can expire. If no user is specified, locally logged on user is assumed.
Example: If LocalUserHasPasswordExpiry Then

If [Not] LocalUserIsLocalAdmin Then
If [Not] LocalUserIsLocalAdmin <UserName> Then

Tests if the local user is local administrator. If no user is specified, locally logged on user is assumed.
Example: If LocalUserIsLocalAdmin Then

If [Not] LocalUserMustChangePassword Then
If [Not] LocalUserMustChangePassword <UserName> Then
If [Not] LocalUserMustChangePassword <UserName>, <RemoteComputerName> Then

Tests if specified local user is forced to change password at next logon. If no user is specified, locally logged on user is assumed.
Example: If LocalUserMustChangePassword Then
Network

If [Not] Alive <RemoteComputerName> Then

Tests if the specified machine or ip is reachable by sending a ping request. The targeting machine has 1000 ms to respond to the ping request.
Example: If Alive AcmeProxy Then SetProxyServer AcmeProxy,8080

If [Not] ComputerIsInDomain Then
If [Not] ComputerIsInDomain <ComputerName> Then

Tests if the computer is member of a domain. If no computername has been specified, the executing computer is assumed.
Example: If ComputerIsInDomain Then

If [Not] InIpScope <StartIP>, <EndIP> Then
If [Not] InIpScope <StartIP>, <EndIP>, <HostOrConnectionName> Then

Tests if the computer's primary network IP address is between the start IP address and the end IP address, both inclusive.
Example: If InIpScope 192.168.0.0,192.168.255.255 Then DisableProxyServer

If [Not] NetworkPresent Then

Tests if a network is present.

If [Not] RASConnection Then

Tests if at least one RAS connection is present. Useful for testing VPN connectivity.
Operating System

If [Not] Server Then

True if operating system is a server version of Windows. Can be used for instance to stop a logon script execution on a server.
Example: If Server Then Exit

If [Not] Windows2000 Then

True if operating system is Windows 2000.

If [Not] Windows2003 Then

True if operating system is Windows 2003 Server (can be both R1 and R2).

If [Not] Windows2008 Then

True if operating system is Windows 2008 Server (can be both R1 and R2).

If [Not] Windows32Bit Then

True if operating system is a 32 bit version of Windows.

If [Not] Windows64Bit Then

True if operating system is a 64 bit version of Windows.

If [Not] Windows7 Then

True if operating system is Windows 7.

If [Not] WindowsNT4 Then

True if operating system is Windows NT 4.

If [Not] WindowsVista Then

True if operating system is Windows Vista.

If [Not] WindowsXP Then

True if operating system is Windows XP.

If [Not] Workstation Then

True if operating system is a workstation version of Windows.
Printers

If [Not] PrinterConnected <UNCPath> Then

Detects if the specified network printer is connected or not.
Processes

If [Not] ProcessRunning <ProcessName> Then
If [Not] ProcessRunning <ProcessName>, <ComputerName> Then

Tests if the specified process is running for any user.
Example: If ProcessRunning Acme.Exe Then KillProcess Acme.Exe

If [Not] UserProcessRunning <ProcessName> Then

Tests if the specified process is running for the current user. Processes running under other accounts are ignored, which is useful for terminal services user scripts.
Example: If UserProcessRunning Acme.Exe Then KillProcess Acme.Exe

If [Not] WindowOpen <Caption> Then

Tests if the specified window is open by the current user. The caption can be partial.
Example: If WindowOpen Notepad Then
Registry

If [Not] RegistryKeyExists <RegistryKey> Then

Tests if the specified registry key exists. HKey_Local_Machine, HKey_Current_User and HKey_Classes_Root can be abbreviated to HKLM, HKCU and HKCR.
Example: If RegistryKeyExists HKCU\Software\Acme Then

If [Not] RegistryKeyExistsx86 <RegistryKey> Then

Tests if the specified registry key exists. HKey_Local_Machine, HKey_Current_User and HKey_Classes_Root can be abbreviated to HKLM, HKCU and HKCR. Key is checked in the redirected registry for 32-bit applications on a 64-bit operating system. Works the same as RegistryKeyExists on a 32-bit operating system or non-redirected keys.
Example: If RegistryKeyExistsx86 HKCU\Software\Acme Then

If [Not] RegistryValueExists <RegistryKey>, <RegistryValue> Then

Tests if the specified registry value exists. To test the content of the value, use the RegistryValue function instead, for instance "If Not [RegistryValue HKCU\Control Panel\Desktop\WallPaper]=[WinDir]\Acme.png Then". HKey_Local_Machine, HKey_Current_User and HKey_Classes_Root can be abbreviated to HKLM, HKCU and HKCR.
Example: If RegistryValueExists HKCU\Software\Acme\Setup Then

If [Not] RegistryValueExistsx86 <RegistryKey>, <RegistryValue> Then

Tests if the specified registry value exists. To test the content of the value, use the RegistryValuex86 function instead, for instance "If Not [RegistryValuex86 HKCU\Control Panel\Desktop\WallPaper]=[WinDir]\Acme.png Then". Value is checked in the redirected registry for 32-bit applications on a 64-bit operating system. Works the same as RegistryValueExists on a 32-bit operating system or non-redirected keys. HKey_Local_Machine, HKey_Current_User and HKey_Classes_Root can be abbreviated to HKLM, HKCU and HKCR.
Example: If RegistryValueExistsx86 HKCU\Software\Acme\Setup Then
Services

If [Not] ServiceInstalled <ServiceName> Then

Tests if the service is installed. Both ServiceName and DisplayName can be used.
Example: If ServiceInstalled MSSQL$SQLEXPRESS Then

If [Not] ServiceRunning <ServiceName> Then

Tests if the service is in a running state. Both ServiceName and DisplayName can be used.
Example: If ServiceRunning MSSQL$SQLEXPRESS Then
Shares

If [Not] ShareExists <UNCPath> Then

Tests if specified file exists.
Example: If ShareExists \\[ComputerName]\WinShared$ Then SetSharePermissions \\[ComputerName]\WinShared$,Acme\Domain Users:Read,Acme\Domain Admins:Full Control
Strings

If [Not] Contains <String>, <SearchString> Then

Tests if the string contains the search string.
Example: If Contains [Var LastServer],AcmeServer01 Then

If [Not] Digits <String> Then

Tests if all characters in the string are numbers (0-9).

If [Not] Empty <String> Then

Tests if the string is empty. Useful for testing when functions return an empty string. Testing for empty variables can be written in a shorter form using the VarIsEmpty condition.
Example: If Not Empty [Env LastServer] Then

If [Not] EndsWith <String>, <SearchString> Then

Tests if the string ends with the search string.
Example: If EndsWith [Var Directory],.profile Then

If [Not] Letters <String> Then

Tests if all characters in the string are letters (A-Z).

If [Not] LettersOrDigits <Char> Then

Tests if all characters in the string are letters (A-Z) or digits (0-9).

If [Not] LowerCase <String> Then

Tests if all characters in the string are lower case.

If [Not] Number <String> Then

Tests if the string is a number.

If [Not] SafePassword <String> Then

Tests if the string is a strong password. The condition is false, if there are less than 6 characters, special characters, missing mixed casing or missing mix of letters and numbers.
Example: If Not SafePassword [Var Password] Then ShowErrorMessage The password does not meet the criteria for a safe password.

If [Not] StartsWith <String>, <SearchString> Then

Tests if the string starts with the search string.
Example: If StartsWith [Var File],Log_ Then

If [Not] UpperCase <String> Then

Tests if all characters in the string are upper case.
Terminal Services

If [Not] TerminalServer Then

Tests if the session is on terminal server. Useful for stopping logon script execution on terminal services.
Example: If TerminalServer Then Exit
Variables

If [Not] VarIsEmpty <Variable> Then

Tests if the variable is empty or not.
Example: If VarIsEmpty MyVar Then Exit