The <launch-application> element lets you start a command or program.
The <command> element specifies the command or program to run. You can provide the path to the command or program in one of the following ways:
In a Solaris environment use the PATH variable. To create an environment variable on Windows, right-click My Computer, select Properties and Advanced, and click the Environment Variables button.
The path must be the same on each CA SOI client. Path statements on Windows should have a double backslash instead of a single backslash, for example:
C:\\Windows\\system32\\cmd.exe
The following syntax rules apply to the <command> element:
The <validate> element verifies that the command or program exists on the client and has run permissions. If either of these conditions is not met during startup, the associated menu item is not added to the menu.
If the <validate> element is not used, the menu item is always added to the menu, but its state is determined by the value of other elements.
The <validate> element requires an absolute path in the <command> element, as shown in the following example:
<launch-application> command>c:\\windows\\system32\\notepad.exe</command> <validate/> </launch-application>
Examples: Launch an Application
The following are two examples for launching an application:
<launch-application>
<command>myapp {0}</command>
<param>
<attribute>AttributeID.NETWORK_ADDRESS</attribute>
</param>
</launch-application>
<launch-application>
<platform>
<os-name>Windows</os-name>
<command>cmd.exe /c start "ping {0}" cmd /c "ping.exe {0}
&&pause"</command>
</platform>
<platform>
<os-name>SunOS</os-name>
<command>>/usr/dt/bin/dtterm -e ping {0}</command>
</platform>
<param>
<attribute>AttributeID.NETWORK_ADDRESS</attribute>
</param>
</launch-application>
At runtime, the specified OS names are compared to the OS name returned by the os.name Java property. A best-match algorithm lets you specify only a prefix of the OS name. The following are valid OS names:
If no specified platforms match, the associated menu item is disabled.
|
Copyright © 2013 CA.
All rights reserved.
|
|