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 22-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> |
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> |
on-inactivity-timer |
on-inactivity-timer has four attributes:
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>
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:
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:
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:
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:
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. on-cardmon must be contained within an action-trigger parent element. on-cardmon has the following attributes:
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:
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> |
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:
The 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:
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. The following is the required attribute:
The following is the optional attribute:
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. The 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. The 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:
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:
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:
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:
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:
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 in to Active Directory. test-ad-logged-in contains no attributes. It contains either one or both of the following child elements:
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:
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:
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:
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:
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:
Because the test-ip-subnet is a test command, it can contain either one or both 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"> <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:
Because test-env-variable is a test command, it can contain either one or both 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"> <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:
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 by using an eDirectory management tool. Find the attribute ARSUserConfiguration and edit the value. The value must be formatted in the 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. An 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:
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:
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> |