Each instance of Desktop Automation Services is driven by an XML document that describes the available 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
Registry Setting |
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. application-runner-script 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> |
action-triggers |
This element is a parent (container) for action-trigger elements (on-nds-login, 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: action-triggers Example: <action-triggers> <on-nds-login action-name="LoginInAction" tree="NCCD_TREE_1"/> </action-triggers> |
on-inactivity-timer |
This command element provides information to the 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 is invoked. If a mouse or keyboard action is detected, the countdown timer stops and resets until the next inactivity is detected. NOTE:The on-inactivity-timer functions only if the network login is present. run-application 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="20" message box="Your workstation will be locked in 5 seconds" interval2="5" action-name="WS-lock"/> </action-triggers></application-runner-script>
NOTE:You must specify only numbers for interval values in the syntax. If you specify special characters in the action.xml file, it does not behave as expected. The on-inactivity-timer is implemented to work with positive numbers, within a range. If negative or special characters are specified, it behaves erroneously. Specify the inactivity timer in seconds. For example, 10 seconds. |
on-nds-login |
This element defines an action trigger to poll for a workstation user logging in to the eDirectory™ instance identified by the tree attribute. The authentication is through the Novell® Client32™ GINA. 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, then Desktop Automation Services executes the configured action identified by the action name attribute value. on-nds-login element must be contained by an action-triggers the parent element. on-nds-login has two attributes:
on-nds-login Example: <action-triggers> <on-nds-login action-name="LoginInAction" tree="NCCD_TREE_1"/> </action-triggers> |
on-ldap-login |
This element defines an action trigger to poll for a workstation user logging in to the directory through the Novell SecureLogin identified by the server attribute. 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, then Desktop Automation Services executes the configured action identified by the action-name attribute value. on-ldap-login must be contained by an action-trigger parent element. on-ldap-login has two attributes:
on-ldap-login Example: <action-triggers> <on-ldap-login action-name="LoginInAction" server="192.168.1.255"/> </action-triggers> |
on-hot-key |
This element installs an action trigger. The action trigger responds to the user typing the specified hot key sequence (see the example below) by invoking Desktop Automation Services to execute the input document action that has the same name as the action-name attribute value.on-hot-key elements must be contained by an action-triggers parent element. on-hot-key has three attributes:
on-hot-key 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-triggers parent element. on-screen-saver has the following attributes:
on-screen-saver Example: <action-triggers> <on-screen-saver action-name="logoff" interval="60000"/> </action-triggers> This results in the logoff action executed in 60 seconds after the Windows screen saver is activated. |
on-cardmon |
The on-cardmon specifies the action to be performed when a smart card is removed. It specifies an ARSaction to be taken when a card is removed. If a user is logged in through a smart card and logs out due to some security reasons, a specific action like system lock must be performed to ensure that the workstation security is not at risk. on-cardmon element must be contained by an action-trigger parent element. on-cardmon has the following attribute:
on-cardmon Example: <action-triggers> <on-cardmon action-name="Log out of the workstation"/> </action-triggers> |
action |
This is the parent element for all the commands that constitute an action. action has one attribute: 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. multi-delay 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: action 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 action hides and shows the desktop icons and other programs before a user logs in. After the user has logged in, the <on-login> condition is met and the Unhide-Desktop action is invoked to display the hidden icons and programs. 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.
run-application has one optional attribute:
run-application cannot have any child elements. run-application 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\MozillaFirefox\firefox.exe" parameters="" on-exit-action=”launchSomethingElseAction”serial="true" interval="500"/> </action></application-runner-script> |
pause |
pause command waits for a specified number of milliseconds before proceeding to perform the next action. pause Example: <?xml version="1.0"?><!DOCTYPE application-runner-script SYSTEM "ARS_1.0.dtd"> <application-runner-script> <action name="sample-action"> <pause interval="500'/> <kill-app application="xmlspy.exe"/> </action> </application-runner-script> NOTE:The interval is mandatory. When ‘sample action’ is triggered, it waits for 500 milliseconds before executing kill-app action. |
test-app-running |
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:
Because the test-app-running is a test command, it can contain either one or both of the following child elements:
test-app-running 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 |
kill-app command element provides information that enables Desktop Automation Services to close an application. kill-app has one essential attribute:
kill-app has one optional attribute:
kill-app cannot contain any child element. kill-app 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 the exclude-apps. kill-all-apps has one essential attribute:
kill-all-apps has one optional attribute:
kill-all-apps cannot have any child elements. kill-all-app 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 provides information that enables Desktop Automation Services to do a normal drive mapping. map-drive has two essential attributes:
map-drive cannot not contain child elements. map-drive 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 provides information that enables Desktop Automation Services to map a drive to a home directory as defined by the homedrive attribute in the user’s eDirectory object. map-home-drive has two essential attributes:
map-home-drive cannot contain any child elements. map-home-drive 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 provides information that enables Desktop Automation Services to map a drive based on a properties file. map-location-drive has four attributes:
map-location-drive cannot contain any child elements. map-location-drive 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 can have only one attribute:
Because the test-logged-in is a test command, it can contain either one or both of the following child elements:
test-logged-in 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 and Novell client32 is not used for authentication. test-ldap-logged-in can have only one attribute:
Because test-ldap-logged-in is a test command, it can contain either one or both of the following child elements:
test-ldap-logged-in 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> |
nds-logout |
This test command element provides information that enables Desktop Automation Services to log out of the primary NDS® connection. nds-logout cannot not have any attributes. nds-logout cannot have any child attributes. nds-logout 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 Novell SecureLogin. ldap-logout can have one optional attribute:
ldap-logout cannot have any child elements. ldap-logout 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 pcProx sonar device triggers an event to start the Windows screen saver program. After the defined time interval of inactivity, the user is logged out. In case 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 the following attributes:
screen-saver-on Example: <action-triggers> <application-runner-script><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></application-runner-script> |
test-nds-attr-val |
This test command element provides information that enables Desktop Automation Services to test whether or not an NDS account contains a particular directory attribute with a particular value. test-nds-attr-val has four 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 one or both of the following child elements:
test-nds-attr-val 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="cn" attr-syntax="integer" attr-val="123"> <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="cn" 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 attributes:
Because the test-ip-subnet is a test command, it can contain either one or both of the following child elements:
test-ip-subnet 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 attributes:
Because the test-env-variable is a test command, it can contain either one or both of the following child elements:
test-env-variable 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 containing the text from the element’s caption attribute. message-box has two attributes:
message-box cannot have any child elements. message-box 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 |
This command directs Desktop Automation Services to access the currently logged-in user and read a custom attribute (ARSUserConfiguration) on that user. The value of this attribute must have the same layout as the standard XML used to configure Desktop Automation Services. NOTE:The XML stored in the user object can contain actions. Triggers are not supported. execute-user-action has one attribute:
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 all the commands that must be performed if the test returns a true value. So, if-true can also 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:
if-true 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 all the commands that must be performed if the test resolves to false. if-false can also be a parent element for all the commands that constitute an action. if-value does not have attribute value. if-value can contain any number of the following child elements:
if-false 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> |