Solved

Problem With cfexecute

Posted on 2001-07-05
8
666 Views
Last Modified: 2013-12-24
I've tried implementing a piece of code offered as a comment by cf_spike in a previous question by another user

the code is <CFEXECUTE ARGUMENTS="c:\website\htdocs\test.cfm testvar=hello" NAME="c:\cfusion\bin\cfml.exe" TIMEOUT="1"/>

the template test.cfm merely tries to output the variable testvar.
I didn't try to output it with any scope as I was not sure if it would be url or maybe form.

The problem is that the template does not recognise the variable. I suspect it may be the way the arguments atribute is formed, but I don't seem able to get the correct syntax.
0
Comment
Question by:jamathon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 4

Expert Comment

by:CF_Spike
ID: 6257423
Depending on which version of ColdFusion Server you are using the code above may or may not work. It should work in CF 5.0, but may fail in previous versions.

You could try passing the arguments as an array to the cfexecute tag instead:

<CFSET myArray = ArrayNew(1)>
<CFSET myArray[1] = "c:\website\htdocs\test.cfm">
<CFSET myArray[2] = "testvar=hello">
<CFEXECUTE ARGUMENTS="#myarray#" NAME="c:\cfusion\bin\cfml.exe" TIMEOUT="5"/>

The variable is passed in the url scope.

Spike

0
 
LVL 2

Author Comment

by:jamathon
ID: 6257463
I'm running 4.5, it can't seem to pick it up even when I use the array. I had the debugger on to see if any variables were present, and they weren't.

It's not urgent, as I was just interested after seeing your comment on the previous question.
I'll have to wait unti I load cf5
Cheers
0
 
LVL 4

Expert Comment

by:CF_Spike
ID: 6257481
Try running the command from the command line to see if it works.

I have done this in CF 4.5x

Spike
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 
LVL 2

Author Comment

by:jamathon
ID: 6257664
I tried c:\cfusion\bin\cfml.exe c:\website\htdocs\test.cfm testvar=hello from a command line

I also tried wrapping testvar=hello in quotes.

neither seemed to work.

any chance of sending me cfml.exe to try from cf5 (It looks like there are 2 associated files in the cfusion\bin.

Thanks
James
0
 
LVL 4

Expert Comment

by:CF_Spike
ID: 6258573
Before I do that,

Can you post the code for test.cfm?

Spike
0
 
LVL 2

Author Comment

by:jamathon
ID: 6258859
I starte out with <cfoutput>#testvar#</cfoutput>.

I then left it as a blank template with the debugger on.
0
 
LVL 4

Accepted Solution

by:
CF_Spike earned 100 total points
ID: 6258866
I can't see anything wrong with that.

what's your email address?

Spike
0
 
LVL 2

Author Comment

by:jamathon
ID: 6259053
james@hard2forget.co.uk

Cheers
0

Featured Post

Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Configuring Apache Camel to send and recieive from QPID Broker 2 76
Webserver access problem 5 78
System Analysis 5 72
Internal to DMZ IIS Authentication. 3 94
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question