All I get in my browser is a blank screen. If I don't use IsDefined, I would get an error in the page stating the variable doesn't exists.
If I misspell a command (example: using /bin/bsh instead of /bin/bash), I get an exception stating CF cannot find the program. So it seems to be working. I just want to check if it's really running.
Here's my code:
------
<cfexecute name="/bin/ls" arguments=" -la /" errorVariable="error" variable="result"></cfexecute>
<cfif IsDefined("result")>
<cfdump var="#result#">
</cfif>
<cfif IsDefined("error")>
<cfdump var="#error#">
</cfif>
<cfexecute name="/bin/bash" arguments=" -c '/bin/ls -la /'" errorVariable="error" variable="result"></cfexecute>
<cfif IsDefined("result")>
<cfdump var="#result#">
</cfif>
<cfif IsDefined("error")>
<cfdump var="#error#">
</cfif>
You have to specify the Absolute path of the application to execute.On Windows, specify an extension, for example, C:\myapp.exe.
I've run the my sqlCMD by using cfexecute, Here I've passed the absolute path of an MS sql server.
I hope it's will help you.