I suggest starting slowly and working your way up. Specifically, forget those variables for a minute. Hard code the name of your batch file and try to run it with cfexecute. Also, you mention passing the arguments, but see nothing in your code to indicate such.
When I've done this before in the past, I've had better luck by running the batch file indirectly, as an argument to the command processor:
c:\path\to\cmd.exe /c c:\path\to\myfile.cmd ...
Dave Watts, CTO, Fig Leaf Software
I still can't get it to work that way. I changed my cfexecute to:
<cfexecute name="C:\windows\system32\cmd.exe" arguments="/c C:\Inetpub\wwwroot\captcha\#cmd_filename#" outputFile="C:\testoutput.txt" timeout = "90"></cfexecute>
And I changed my bat file to have:
TSC.exe /s "#newString#" C:\Inetpub\wwwroot\captcha\#FileName# Mary (for Telephone)
The output file is showing:
C:\>TSC.exe /s "3.....P.....4.....Z.....8.....U.....7.....X....." C:\Inetpub\wwwroot\captcha\3P4Z8U7X-105724.wav Mary (for Telephone)
I still can't get it to run the exe. I have watched the process list while running this and the exe doesn't show up. I tried cfexecute on the exe directly before trying the bat method, with hard coded arguments, and it still didn't work. I am so lost right now this makes no sense to me.
Try this to get more info. Put acfabort in front of the cfexecute code. Run your script - let it create the bat file and then stop before trying to execute it. Then go into a DOS box on the same machine and execute the bat file manually, see what happens. What does it give yoy for any errors, etc.