Solved

Problem With cfexecute

Posted on 2001-07-05
8
625 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
  • 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
 
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now