Solved

Problem With cfexecute

Posted on 2001-07-05
8
637 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Question has a verified solution.

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

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

863 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

22 Experts available now in Live!

Get 1:1 Help Now