CFML Language Reference

----------------------------------------------------------------------------
----
Chapter 1 :  ColdFusion Tags

CFEXECUTE
Enables ColdFusion developers to execute any process on the server machine.

Syntax
<CFEXECUTE
    NAME=" ApplicationName "
    ARGUMENTS="CommandLine Arguments"
    OUTPUTFILE="Output file name"
    TIMEOUT="Timeout interval in seconds">

NAME
Required. The full path name of the application that is to be executed.

Note: On Windows systems, you must specify the extension, for example, .exe,
as part of the application's name.

ARGUMENTS
Optional. Any command-line arguments that should be passed to the program.

If ARGUMENTS is specified as a string, it is processed as follows:

On Windows systems, the entire string is passed to the Windows process
control subsystem for parsing.
On UNIX, the string is tokenized into an array of arguments. The default
token separator is a space; arguments with embedded spaces may be delimited
by double quotes.
If ARGUMENTS is passed as an array, it is processed as follows:

On Windows systems, the array elements will be concatenated into a string of
tokens, separated by spaces. This string is then passed to the Windows
process control subsystem as above.
On UNIX, the elements of the ARGUMENTS array is copied into a corresponding
array of exec() arguments.
OUTPUTFILE
Optional. The file where the output of the program is to be directed. If
this is not specified, the output appears on the page from which it was
called.

TIMEOUT
Optional. Indicates how long in seconds the ColdFusion executing thread will
wait for the spawned process. Indicating a timeout of 0 is equivalent to the
non-blocking mode of executing. A very high timeout value is equivalent to a
blocking mode of execution. The default is 0; therefore, the ColdFusion
thread spawns a process and immediately returns without waiting for the
process to terminate.

If no output file is specified, and the timeout value is zero, then the
program's output will be directed to the bit bucket.

Usage
CFEXECUTE is available on Windows NT 4.0 and UNIX platforms. Do not put any
other ColdFusion tags or functions between the start and the end tags of
CFEXECUTE. Also, CFEXECUTE tags cannot be nested.

Exception
CFEXECUTE throws the following exceptions:

If the application name is not found, an Application File Not Found
exception will be thrown.
If the output file cannot be opened, an Output File Cannot be opened will be
thrown.
If the effective user of the ColdFusion executing thread does not have
permissions to execute the process, a security exception will be thrown.
The time out values must be between 0 and some high number (to be
determined).
Example
<!----------------------------------------------------------------------
This example illustrates use of the CFEXECUTE tag.
----------------------------------------------------------------------->
<HTML>
<HEAD>
<TITLE>CFEXECUTE</TITLE>
</HEAD>

<BODY>
<H3>CFEXECUTE</H3>
<P>
This example executes the Windows NT version of the netstat network
monitoring program, and places its output in a file.

<CFEXECUTE NAME="C:\WinNT\System32\netstat.exe"
    ARGUMENTS="-e"
    OUTPUTFILE="C:\Temp\output.txt"
    TIMEOUT="1">

</CFEXECUTE>
</BODY>
</HTML>

Copyright � 1999, Allaire Corporation. All rights reserved.


Todd Ashworth

----- Original Message -----
From: "Bill Poff" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 13, 2000 10:17 AM
Subject: Command Line Programs


| <html><div>Can anyone make a suggestion for the best way to run a command
| line</div>
| <div>application from within Cold Fusion?</div>
| <br>
| <div>&nbsp;I need to execute something like:</div>
| <br>
|
<div><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>command.
exe
| param param param</div>
| <br>
| --Bill
| <br>
|
| <font face="Courier New, Courier"><br>
| ---------------------------------------------------------------<br>
| &nbsp; Web Hosting $14.95/mo&nbsp; -&nbsp; E-Commerce Hosting from
| $24.95/mo<br>
| ---------------------------------------------------------------<br>
| &nbsp;ICN.NET&nbsp; - INTERNET HOSTING - DEVELOPMENT - SUPPORT
| SERVICES<br>
| Box 2570, Roanoke, VA 24010 - 540-343-8322 - Fax: 540-343-0691<br>
| ---------------------------------------------------------------<br>
| Contact [EMAIL PROTECTED] for all support/site maintenance
| issues</font></html>
|
| --------------------------------------------------------------------------
----------------------
| Archives: http://www.mail-archive.com/[email protected]/
| Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]
|


------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to