Hello,
I am using the <cfexecute> tag for the first time and I'm having trouble
getting the correct result. I don't get any error message so figuring out what
I'm doing wrong has been more than difficult.
We have a batch file for encrypting an xml file that works fine from the
command prompt. However, we need this file to execute from a CF page. The code
looks like the item below:
<cfexecute name = "D:\inetpub\wwwroot\createFiles\xmlFiles\w1200\encrypt.bat"
arguments = #arguments#
outputFile = "D:\inetpub\wwwroot\createFiles\xmlFiles\w1200\#outfileName#"
timeout = "5">
</cfexecute>
The arguments include the ecryption key to use and the name of the file to
encrypt. Both the key and the file name are correct when I output those values.
Hardcoding the same values into the batch file instead of passing them as
arguments makes no difference. The cfexecute simply doesn't produce the same
result as running it manually.
The end result of this process is that the encrypted file is created and has
the correct name, but it contains no encryption information - i.e., it is
basically an empty file and useless.
I don't know if this is a ColdFusion problem or not. Since the batch file runs
okay on its own, I'm figuring it is the <cfexecute> that is at fault. Since
there is no error message and the batch file produces an output file rather
than failing as it would if passed an incorrect encryption key or a
non-existent xml file to encrypt, I am at a loss to know where to start to try
and fix this problem.
I've seen lots of other posts about <cfexecute> problems that seem similar to
this one, but none of the suggested solutions has any effect on this one.
Changing the timeout value has no effect. Checking server permissions doesn't
show any problems, etc.
Any suggestions about where to look next would be appreciated. Thanks.
Laksma - 28 Nov 2006 03:56 GMT
Try to use cfx_exec instead.
Laksma