cancel
Showing results for 
Search instead for 
Did you mean: 

Limitation of the Execute Target File Action

Limitation of the Execute Target File Action

Summary

This article discusses a limitation of the Execute Target File Action.

Synopsis

This article discusses a limitation of the Execute Target File Action. In this case, the Execute Script/Batch file Action should be used instead.

Discussion

When executing a command with parameters and redirecting the command output to a text file, the Execute Target File Action executes a command that fails.

For example:
$USER_INSTALL_DIR$$/$lmhostid.exe -ether >> hostid.txt

The limitation of the Execute Target File Action is that lmhostid.exe is the executed command and the rest of the line (-ether >> hostid.txt) is treated as parameters. However, only -ether is intended as the parameter for the lmhostid.exe command. >> hostid.txt is intended to redirect the output of the lmhostid.exe -ether command to a text file. As a result, the Execute Target File Action fails to execute the command properly. Hence, the user should use an Execute Script/Batch File Action instead, because the Execute Script/Batch File Action runs the Script as a Linux shell script or Windows batch file, which results in the correct execution of the lmhostid.exe command with the -ether parameter with the separate redirection to the hostid.txt text file. In other words, the Execute Script/Batch File Action does not treat the entire line as a single command; the action executes the command as though the user ran the command from the command-line.

Additional Information

For more information about the Execute Target File Action, click here.
Was this article helpful? Yes No
No ratings