20.1 Actions and Descriptions

Each instance of Desktop Automation Services is configured by an XML document that defines events and desired actions.

The following table describes the elements that might be used to compose a Desktop Automation Services XML input document.

Unless otherwise specified, all XML attributes listed for a given element are required for that element.

Table 20-1 Desktop Automation Services XML Description

XML Tags

Description

application-runner-script

This is the parent element for an Desktop Automation Services input document.

application-runner-script has no attributes.

application-runner-script can contain any number of action elements.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
          <run-application application= "notepad.exe" interval="500" serial="true" parameters="" />
     </action> 
     <action-triggers> 
         <on-inactivity-timer interval1="100" messagebox="Your " interval2="8" action-name="sample-action"/> 
     </action-triggers>
</application-runner-script>

action-triggers

This element is a parent (container) for action-trigger elements such as on-nds-login, or on-hot-key.

action-triggers enables Desktop Automation Services executables to respond to workstation events by triggering specified actions as defined in the input document.

action-triggers has no attributes.

action-triggers can contain any of the following child elements:

For Example:

<action-triggers>
      <on-nds-login action-name="LoginInAction" tree="NCCD_TREE_1"/>
</action-triggers>

on-inactivity-timer

on-inactivity-timer has four attributes:

  • interval1: is the time of executing an action

  • interval2: is the time after which warning dialog will be displayed.

  • messagebox: contains the message to be displayed in the warning.

This command element provides information to Desktop Automation Services on the action to be performed if the workstation is inactive for more than the specified period of time.

At the end of the countdown period, a specified action such as Close all programs or Lock the Workstation can be invoked. If a mouse or keyboard action is detected, the countdown timer stops and resets until the next inactivity is detected.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">

<application-runner-script>

   <action name="sample-action">

       <run-application application="notepad.exe" interval="500" serial="true" parameters="" />

   </action>  

   <action-triggers>

       <on-inactivity-timer interval1="100" message box="Your"  interval2="8" action-name="sample-action"/> 

   </action-triggers>

</application-runner-script>
  • interval1 is the time of executing an action.

  • interval2 is the time after which warning dialog will be displayed.

  • messagebox contains the message to be displayed in the warning.

  • action-name is the name of the action to be executed.

Specify the inactivity timer in seconds. For example, 10 seconds.

NOTE:You must specify only numbers for interval values in the syntax. If you use special characters in the action.xml file, it does not behave as expected.

The on-inactivity-timer is implemented to work with positive numbers. If a negative number or special character is specified, it will behave erroneously.

The on-inactivity-timer functions only if the network login is present.

on-nds-login

This element defines an action trigger that is activated when a user logs in to eDirectory through the Novell Client GINA/Credential Provider. If a user logs in to the tree, an action trigger invokes Desktop Automation Services. It tests the primary connection to see if the current tree matches the configuration. If it matches, Desktop Automation Services executes the configured action identified by the action name attribute value.

on-nds-login element must be contained within an action-triggers parent element.

on-nds-login has two attributes:

  • action-name: The name of an action defined in the input document that is executed when a user logs in to the tree named by the tree attribute. The action-name must be contained in double quotes.

  • tree: Connections are tested periodically to see if they are linked to the tree named by this network name. The tree name must be contained in double quotes.

For example:

 <action-triggers>

      <on-nds-login action-name="LoginInAction" tree="NCCD_TREE_1"/>

 </action-triggers>

on-ldap-login

This element defines an action trigger that is activated when a user logs in to eDirectory through SecureLogin's LDAP client.

Desktop Automation Services tests the primary connection to check whether the current server matches the server attribute specified in the configuration. If the current server matches the configuration, Desktop Automation Services executes the configured action identified by the action-name attribute value.

on-ldap-login must be contained by an action-triggers parent element.

on-ldap-login has two attributes:

  • server: The connections are tested periodically to test if the user is connected to a server matching this element name.

  • action-name: The name of an action defined in the input document that is executed when a user logs in to the tree named by the tree attribute.

For Example:

<action-triggers>

      <on-ldap-login action-name="LoginInAction" server="192.168.1.255"/>

</action-triggers>

NOTE:Ensure that the server address matches the LDAP Server address provided during installation..

on-hot-key

This element defines an action trigger to respond to the user typing the specified hot key sequence.This causes Desktop Automation Services to execute the matching action as defined in the input document. The on-hot-key elements must be contained within an action-trigger parent element.

on-hot-key has three attributes:

  • virtual-key: The hex value of the key based on the virtual key map. This element specifies that it is the second component of the hot key sequence.

  • modifiers: The modifiers indicate the keys that are pressed in together with the virtual key to cause the hot-key event. The hex value might be a combination of one or more of the following, separated by a plus sign (+):

    • alt indicates the Alt key

    • ctrl indicates the Ctrl key

    • shift indicates the Shift key

    • win indicates the Windows key

    This element specifies that it is the first component of the hot key sequence.

  • action-name: The name of an action defined in the input document that is executed when the hot-key sequence is detected.

For Example:

<action-triggers>
    <on-hot-key virtual-key="h" modifiers="ctrl+shift" action-name="HKeyAction"/>
</action-triggers>

A virtual-key value of 'h' and a modifiers value of ‘ctrl+shift’ produces a Control-Shift-H HotKey sequence.

on-screen-saver

This element causes an action to be called when the workstation enters the screensaver mode. on-screen-saver elements must be contained by an action-trigger parent element.

on-screen-saver has the following attributes:

  • action-name: The name of the action defined in the input document that is executed when the workstation has entered the screensaver mode and the specified interval has elapsed.

  • interval: The amount of time in milliseconds that the ARSControl waits before running the specified action after a screensaver event is triggered.

    NOTE:To activate this trigger, you must have a Windows system screen saver selected. Set the screen saver wait time to the desired time interval before the workstation activates the screen saver. If you are using DAS to activate the screen saver through the on-inactivity-timer action trigger, set the wait time to a longer timer interval than what you set for the on-inactivity-timer action trigger. For example, you can set the on-inactivity-timer interval to 60 minutes. The screen saver is triggered from DAS on the shared workstation.

For Example:

<action-triggers>
   <on-screen-saver action-name="logoff" interval="60000"/>
</action-triggers>

This results in the logoff action being executed 60 seconds after the Windows screen saver is activated.

on-cardmon

The on-cardmon element specifies the action to be performed when a smart card is inserted, removed or when it is used for the login to the directory. If a user is logged in through a smart card and logs out because of a security reason, a specific action like a system lock must be performed to ensure that the workstation security is not at risk.

The on-cardmon element must be contained within an action-trigger parent element.

on-cardmon has the following attributes:

  • action-name: The name of the action defined in the input document that is executed when the card is removed from the reader.

  • card-insert: The name of the action defined in the input document that is executed when the card is inserted to the reader.

  • LoginAction: The name of the action defined in the input document that is executed when the user successfully logs into the Directory.

    If the login action fails card-insert action is repeated again.

For example:

<action-triggers>
   <on-cardmon action-name="Removal" card-insert="Insertion" LoginAction = "unHideMe" />
</action-triggers>

on-Tap-cardmon

The on-Tap-cardmon element specifies the action to be performed when a contactless smart card is tapped on and tapped out, or when it is used for the login to the directory. If a user is logged in through a smart card and logs out because of a security reason, a specific action like a system lock must be performed to ensure that the workstation security is not at risk.

The on-Tap-cardmon element must be contained within an action-trigger parent element.

on-Tap-cardmon has the following attributes:

  • action-name: The name of the action defined in the input document that is executed when the card is tapped out from the reader.

  • card-tapon: The name of the action defined in the input document that is executed when the card is tapped on to the reader.

  • LoginAction: The name of the action defined in the input document that is executed when the user successfully logs into the Directory.

    If the login action fails card-tapon action is repeated again.

  • TapCardSwitchUser: This attribute is used to restrict the card tap to switch users in the kiosk mode. If this attribute value is set to true, then single card tap is required to switch the user in kiosk mode. If this attribute value is set to false, then double card tap is required to switch the user in kiosk mode.

For example:

<action-triggers>
   <on-Tap-cardmon action-name="Tappedout" card-tapon="Tappedon" LoginAction = "unHideMe" TapCardSwitchUser="true"/>
</action-triggers>

on-ad-login

This element defines an action trigger to poll for a user logging in to a workstation,in the Active Directory domain.

This support is for SecureLogin installed in the Active Directory mode. If a user logs in to Active Directory, an action trigger invokes Desktop Automation Services which in turn executes the configured action identified by the action-name. on-ad-login element must be contained within the parent element, action-triggers.

For example:

<action-triggers>
   <on-ad-Login action-name="LogInAction"/>

</action-triggers>

action

This is the parent element for all the commands that constitute an action.

action has two attributes:

name: The name can be any arbitrary string value. The character case in the name used by a caller to invoke an action must match the case used where the action is defined. The action-name must be contained in double quotes.

multi-delay: This command element specifies the interval in executing the same action, twice.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
     <action name="ctrl+l" multi-delay="4000">
     </action>
</application-runner-script>

action can contain any number of the following child elements:

For example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
   <action name="sample-action">
     <map-drive drive-letter="o:" remote-name="\\192.168.1.255\sys"/>
   </action>
</application-runner-script>

Hide-Desktop and Unhide-Desktop

The Hide-Desktop and Unhide-Desktop actions will hide or show the items on the user’s desktop. These commands can be used with the on-login element to disable the users desktop prior to login and then to enable the desktop when the user login has been completed.

NOTE:These actions are primarily for a kiosk approach without role-based access or for workstation policies managed through ZENworks® syntax. If you specify special characters in the action.xml file, it does not behave as expected.

run-application

This command element provides information that enables Desktop Automation Services to run an application and respond when the application is closed. There are four required attributes and one optional attribute.Following are the required attributes:

  • application: The name of the application to launch, such as notepad.exe. For applications that the operating system cannot find through the configured path environment variable, specify the complete application path and file extension.

  • parameters: Lists the required parameters to be passed to the application. This attribute should have text values enclosed within double quotes (“”).

  • serial: This attribute defines the application to run in synchronous or asynchronous mode. The attribute value can be either true or false. When this attribute is set to true (in synchronous mode), then the execution of the parent action does not continue until the application is closed or the interval timeout has expired.

  • interval: The timeout interval is used only used when the serial attribute is set to true (synchronous mode). If the application has not returned by the specified timeout, Desktop Automation Services stops waiting for a return and executes the next action.

Following is an optional attribute:

  • on-exit-action: When the application started by this element is closed, the specified action is called.

run-application cannot have any child elements.

For example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
   <action name="sample-action">
      <run-application application="C:\Program Files\Mozilla Firefox\firefox.exe" parameters="" on-exit-action="launchSomethingElseAction"serial="true" interval="500"/>
   </action>
</application-runner-script>

test-app-running

The test-app-running command element provides information that enables Desktop Automation Services to test whether an application is running or not. .

test-app-running can have only one attribute:

  • application: The name of the application as it is found in the process list.

Because test-app-running is a test command, it can contain either one or both of the following child elements:

  • if-true: An element containing the command operations to perform if the test returns a true value.

  • if-false: An element containing the command operations to perform if the test returns a false value.

For example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
        <test-app-running application="notepad.exe">
          <if-true>
             <kill-app application="xmlspy.exe"/>
             <kill-all-apps exclude-apps="notepad.exe:xmlspy.exe"/>
            <map-drive drive-letter="F:" remote-name="\\172.16.5.250\sys"/>
          </if-true>
          <if-false>
            <map-drive drive-letter="G:" remote-name="\\192.168.1.255\sys"/>
          </if-false>
        </test-app-running>
     </action>
</application-runner-script>

kill-app

The kill-app command element provides information that enables Desktop Automation Services to close an application.

kill-app has one required attribute and one optional attribute.

Following is the required attribute:

  • application: The name of the application to close, as found in the process list.

Following is the optional attribute:

  • interval: The amount of time in milliseconds that Desktop Automation Services waits after sending a close command to the application before killing the process. The default interval value is 1000.

kill-app cannot contain any child element.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
          <kill-app application="xmlspy.exe"/>
     </action>
</application-runner-script>

kill-all-apps

This command element provides information that enables Desktop Automation Services to kill all the running applications except those specified in exclude-apps.

kill-all-apps has one required attribute and one optional attribute.

Following is the required attribute:

  • exclude-apps: The names of the applications that must not be killed. The application names are separated by a colon (:) character. The name of an application listed in this attribute must match the name of the application listed in the Processes tab of the Task Manager.

Following is the optional attribute:

  • interval: The amount of time in milliseconds that Desktop Automation Services waits after sending a close command to an application before killing the process. Because each process is closed in a sequential order, a large interval significantly increases the amount of time the command takes to execute. The default value is 0.

kill-all-apps cannot have any child elements.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
          <kill-all-apps exclude-apps="notepad.exe:xmlspy.exe"/>
     </action>
</application-runner-script> 

map-drive

This command element enables Desktop Automation Services to perform a drive mapping.

map-drive has two required attributes:

  • drive-letter: Specifies the drive letter to assign to the new mapped drive.

  • remote-name: Specifies the path in UNC format for a remote volume to be mapped.

map-drive cannot contain child elements.

For example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
          <map-drive drive-letter="G:" remote-name="\\192.168.1.255\sys"/>
     </action>
</application-runner-script>

map-home-drive

This command element enables Desktop Automation Services to map a drive to a home directory as defined by the homedrive attribute in the user’s directory object.

map-home-drive has two required attributes:

  • drive-letter: Specifies the drive letter to assign to the new mapped drive. This value should be a letter representing the drive pointer, followed by a colon (:) character enclosed within double quotes.

  • tree: Specifies the tree containing the object with the home directory information.

map-home-drive cannot contain any child elements.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
          <map-home-drive drive-letter="I:" tree="TestTree"/>
     </action>
</application-runner-script>

map-location-drive

This command element enables Desktop Automation Services to map a drive based on a properties file. The properties file is an acscii based text file that contains the necessary mapping information for one or more drives.

map-location-drive has four required attributes:

  • drive-letter: Specifies the drive letter to assign to the new mapped drive. This value should be a letter representing the drive pointer followed by a colon (:) character enclosed within double quotes.

  • tree: Specifies the tree containing the object with the location information.

  • attribute: Specifies the key to be used to obtain a value from the properties file.

  • file-name: Specifies the file system path to a properties file containing information for the map-location-drive operation. This file contains property information in the form of key or value pairs. The property key is located on the left of the equals symbol (=) and the value is on the right side. For example: here=\\137.65.60.39\Share2 there=\\137.65.60.39\Share3

map-location-drive cannot contain any child elements.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
          <map-location-drive drive-letter="T:" tree="TestTree2" file-name="c:\yourFile.c" attribute="yourAttribute"/>
     </action>
</application-runner-script>

test-logged-in

This command element provides information that enables Desktop Automation Services to test whether the user is logged in to a particular eDirectory server or not.

test-logged-in has one required attribute:

  • tree: The name of the tree for which the logged in state has to be tested.

Because the test-logged-in is a test command, it can contain either one or both of the following child elements:

  • if-true: An element containing the command operations to perform if the test returns a true value.

  • if-false: An element containing the command operations to perform if the test returns a false value.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
    <action name="sample-action">
       <test-logged-in tree="TestTree">
          <if-true>
            <run-application application="explorer.exe" parameters="" serial="false" interval="1000"/>
             <map-home-drive drive-letter="I:" tree="TestTree"/>
         </if-true>
         <if-false>
            <map-location-drive drive-letter="J:" tree="TestTree" file-name="c:\myFile.c" attribute="myAttribute"/>
         </if-false>
      </test-logged-in>
    </action>
</application-runner-script>

test-ldap-logged-in

This command element provides information that enables Desktop Automation Services to test whether the user is logged in to a particular LDAP server or not. This command must only be used when using the LDAP GINA/Credential Provider for authentication.

test-ldap-logged-in has one required attribute:

  • server: The name of the server for which the logged-in state must be tested.

Because test-ldap-logged-in is a test command, it can contain either or both of the following child elements:

  • if-true: An element containing the command operations to perform if the test returns a true value.

  • if-false: An element containing the command operations to perform if the test returns a false value.

For example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
   <action name="sample-action">
      <test-ldap-logged-in server="192.168.1.255">
         <if-true>
            <run-application application="explorer.exe" parameters="" serial="false" interval="1000"/>
        </if-true>
         <if-false>
            <run-application application="iexplore.exe" parameters="" serial="false" interval="1000"/>
         </if-false>
      </test-logged-in>
  </action>
</application-runner-script>

test-ad-logged-in

The test-ad-logged-in command element provides information that enables Desktop Automation Services to test whether a user is logged into the Active Directory

test-ad-logged-in contains no attributes. It contains either one or both of the following child elements:

  • if-true: This element contains the command operations to perform if the test returns a true value.

  • if-false: This element contains the command operations to perform if the test returns a false value

For Example:

<action name="test">
   <test-AD-logged-in>
     <if-true>
       <message-box caption="User are logged in"  />
     </if-true>
     <if-false>
       <message-box caption="User are not logged in"  />
     </if-false>
   </test-AD-logged-in>
</action>

ad-logout

This test command element provides information that enables Desktop Automation Services to log out of the SecureLogin in the Active Directory mode.

ad-logout does not have any attributes or child attributes.

For Example:

<application-runner-script>
   <action name="sample-action">
     <AD-logout/>
   </action>
</application-runner-script>

nds-logout

This test command element provides information that enables Desktop Automation Services to log out of the primary NDS® connection.

nds-logout has no attributes.

nds-logout has no child attributes.

For example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
          <nds-logout/>
     </action>
</application-runner-script>

ldap-logout

This test command element provides information that enables Desktop Automation Services to log out of SecureLogin.

ldap-logout can have one optional attribute:

  • gina: Can have either true or false values. If the value is true, the login dialog box for SecureLogin is displayed after logging out of SecureLogin. If the value is false, no action is taken. The default value is true.

ldap-logout cannot have any child elements.

For example:

<action name="logoff">
     <pause interval="100"/>
     <kill-all-apps exclude-apps="slbroker.exe:slwinsso.exe:slproto.exe:explorer.exe:"/>
     <ldap-logout gina="true"/>
</action>

screen-saver-on

This action tag invokes the Windows screen saver, which triggers the on-screen-saver action. When this action is triggered, the Windows screen saver is started and the DAS on-screen-saver is invoked with timer.

This action locks the workstation and triggers the screen saver, which covers up any icons and browsers. screen-saver-on elements must be contained by an action-triggers parent element.

Use Case: A user is away from the workstation. A smartcard device triggers an event to start the Windows screen saver program. After the defined time interval of inactivity, the user is logged out. If an activity occurs, the screen saver closes; the user is not logged out. The user returns to the workstation, which is in an undisturbed state. The screen-saver-on action ensures that the icons and browsers are covered.

screen-saver-on has one optional attribute:

  • lock: If lock is set to true, the workstation is locked after the screen saver is activated. The user must enter the password to unlock the workstation and the screen saver.

    If lock is set to false, the workstation lock is not activated. Any mouse movement or keystroke deactivates the screen saver.

For Example:

   <action name="Act1">
      <screen-saver-on/>
   </action>
   <action name="Act2">
      <screen-saver-on lock="true"/>
   </action>
   <action name="Act3">
      <screen-saver-on lock="false"/>
   </action>
   <action-triggers>
      <on-hot-key virtual-key="l" modifiers="ctrl" action-name="Act1"/>
      <on-hot-key virtual-key="m" modifiers="ctrl" action-name="Act2"/>
      <on-hot-key virtual-key="n" modifiers="ctrl" action-name="Act3"/>
   </action-triggers>

test-nds-attr-val

This test command element provides information that enables Desktop Automation Services to test whether or not the currently logged in users NDS account contains a particular directory attribute with a particular value.

test-nds-attr-val has four required attributes:

  • tree: The name or IP address of the tree containing the user account to be searched for the attribute value.

  • attr-name: The name of the attribute to be tested in the NDS account.

  • attr-syntax: The syntax of the attribute to be tested in the NDS account.

    The acceptable attr-syntaxes are:

    • string

    • integer

    • boolean

  • attr-val: The value to be searched in the target attribute in the NDS account. The values for the Boolean syntax attribute must be either true or false.

NOTE:If the attribute syntax is string, then the comparison between the value retrieved from the eDirectory and the value of the attr-val is case sensitive.

Because the test-nds-attr-val is a test command, it can contain either or both of the following child elements:

  • if-true: An element containing the command operations to perform if the test returns a true value.

  • if-false: An element containing the command operations to perform if the test returns a false value.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
   <action name="sample-action1">
      <test-nds-attr-val tree="TestTree" attr-name="cn" attr-syntax="string" attr-val="larry">
         <if-true>
            <kill-app application="george.exe"/>
            <run-application application="fred.exe" parameters="" serial="true" interval="250"/>
         </if-true>
         <if-false>
            <map-drive drive-letter="S:" remote-name="\\172.16.5.253\sys"/>
         </if-false>
      </test-nds-attr-val
   </action>
   <action name="sample-action2">
      <test-nds-attr-val tree="TestTree" attr-name="Password Minimum Length" attr-syntax="integer" attr-val="5">
         <if-true>
            <!—any commands may be inserted here-->
         </if-true>
         <if-false>
            <!â€"any commands may be inserted here-->
         </if-false>
      </test-nds-attr-val>
   </action>
   <action name="sample-action3">
      <test-nds-attr-val tree="TestTree" attr-name="Password Required" attr-syntax="boolean" attr-val="true">
         <if-true>
            <!â€"any commands may be inserted here-->
         </if-true>
         <if-false>
            <!—any commands may be inserted here-->
         </if-false>
      </test-nds-attr-val>
   </action>
<application-runner-script>

test-ip-subnet

This test command is useful for enabling an action to determine if the workstation resides on a particular network or not. This can be critical if the action is deciding whether to launch a particular application that is available or effective in a given network.

When invoked, the test-ip-subnet command executes the child commands if the current subnet of the workstation and the command’s addr attribute value are the same.

test-ip-subnet has two required attributes:

  • addr: An IP subnet to compare with the local IP addresses of the machine.

  • subnet: The subnet mask (in the form of 255.255.255.0) is applied to the addr attribute and the local IP addresses, which are then compared. If the network portion matches, the test returns a true value.

Because the test-ip-subnet is a test command, it can contain either one or both of the following child elements:

  • if-true: An element containing the command operations to perform if the test returns a true value.

  • if-false: An element containing the command operations to perform if the test returns a false value.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
   <action name="sample-action">
      <test-ip-subnet addr="192.168.1.0" subnet="255.255.255.0">
         <if-true>
            <run-application application="write" parameters="" serial="true" interval="500"/>
         </if-true>
         <if-false>
            <run-application application="notepad" parameters="" serial="true" interval="500"/>
         </if-false>
      </test-ip-subnet>
   </action>
</application-runner-script>

test-env-variable

This test command element enables Desktop Automation Services to test whether an environment variable matches a specific value or not.

test-env-variable has two required attributes:

  • var-name: The case-sensitive environment variable name. If the variable does not exist, the test returns a false value.

  • var-value: The value used for case-insensitive comparison with the actual variable value.

Because test-env-variable is a test command, it can contain either one or both of the following child elements:

  • if-true: An element containing the command operations to perform if the test returns a true value.

  • if-false: An element containing the command operations to perform if the test returns a false value.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
   <action name="sample-action">
      <test-env-variable var-name="Testvar" var-value="testvalue">
         <if-true>
            <run-application application="write" parameters="" serial="true" interval="500"/>
         </if-true>
         <if-false>
            <run-application application="notepad" parameters="" serial="true" interval="500"/>
         </if-false>
      </test-env-variable>
   </action>
</application-runner-script>

message-box

This command element provides information that enables Desktop Automation Services to display a message box.

message-box has two required attributes:

  • caption: The text to be displayed in the dialog box.

  • window-name: The title for the dialog box window.

message-box does not have any child elements.

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
   <action name="sample-action">
       <message-box caption="HotKey Control+H was pressed." window-name="HotKey Event"/>
   </action>
</application-runner-script>

execute-user-action

The value of this attribute can be set using iManager or other equivalent eDirectory management tool. To edit the value of this attribute with iManager, open the properties of the user object and then navigate to the other tab. Find the attribute ARSUserConfiguration and edit the value. The value must be formatted in XML syntax as used by the Desktop Automation Services.

NOTE:The XML information stored in the user object can contain only actions. Triggers are not supported.

execute-user-action has one required attribute:

  • action-name: The name of the configured action read from the user object.

Example value for the ARSUserConfiguration attribute:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
    <action name="userAction">
       <!--.
          .  Any actions may be inserted here.
          . -->
    </action>
</application-runner-script>

execute-user-action Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
    <action name="sample-action">
         <execute-user-action action-name="userAction"/>
    </action>
</application-runner-script>

if-true

This is one of the two allowed types of child elements for a test type of command. The other element is if-false.

if-true contains the result of all the test commands that return a true value. So, if-true can be a parent element for all the commands that constitute an action.

if-true does not have any attribute values.

if-true can contain any number of the following child elements:

  • run-application

  • test-app-running

  • kill-app

  • kill-all-apps

  • map-drive

  • map-home-drive

  • map-location-drive

  • test-logged-in

  • test-ldap-logged-in

  • test-nds-attr-val

  • test-ip-subnet

  • test-env-variable

  • message-box

  • nds-logout

  • ldap-logout

  • execute-user-action

For Example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
     <action name="sample-action">
        <test-env-variable var-name="Testvar" var-value="testvalue">
           <if-true>
              <run-application application="write" parameters="" serial="true" interval="500"/>
           </if-true>
           <if-false>
              <run-application application="notepad" parameters="" serial="true" interval="500"/>
           </if-false>
        </test-env-variable>
     </action>
</application-runner-script>

if-false

This is one of the two allowed types of child elements for a test type of command. The other element is if-true.

if-false contains the result of all the test commands that return a false value. So, if-false can be a parent element for all the commands that constitute an action.

if-false does not have attribute value.

if-false can contain any number of the following child elements:

  • run-application

  • test-app-running

  • kill-app

  • kill-all-apps

  • map-drive

  • map-home-drive

  • map-location-drive

  • test-logged-in

  • test-ldap-logged-in

  • test-nds-attr-val

  • test-ip-subnet

  • test-env-variable

  • message-box

  • nds-logout

  • ldap-logout

  • execute-user-action

For example:

<?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd">
<application-runner-script>
   <action name="sample-action">
      <test-env-variable var-name="Testvar" var-value="testvalue">
         <if-true>
            <run-application application="write" parameters="" serial="true" interval="500"/>
         </if-true>
         <if-false>
            <run-application application="notepad" parameters="" serial="true" interval="500"/>
         </if-false>
      </test-env-variable>
   </action>
</application-runner-script>