Environment Variables In Parameters
It is possible to specify environment variables of the target machine in the parameters by adding a %-sign before and after the variable name.
Example: %ASMROOT%\mydir\yourdir would expand to e.g. c:\tngsd\sd\\mydir\yourdir on the target machine.
An example, where redirection (>>) is used in the Item Procedure command file to get the computer name and LAN ID, as well as server's clock, written into the result file:
@echo Computer name: %3>>%1 @echo Computer alias: %2>>%1 @echo Time: %4-%5-%6 %7: %8: %9>>%1
The procedure parameters are $rf $cn $cl, where %1 is connected with $rf, %2 and %3 with $cn and %4 - %9 with $cl.
Redirection of command output can also be used for example in the following way, >$rf, when targeting jobs for Windows NT/2000/XP, UNIX and OS/2 computers. This type of redirection is not supported for Windows 95.
On UNIX and Windows NT/2000/XP, ">$rf", >"$rf" and >$rf all work. On Windows CE, just use ">$rf".
When a DM script is used, and the interpreter is launched from the command line, you have to escape the ">" from the command line interpreter.
|
Copyright © 2014 CA Technologies.
All rights reserved.
|
|