Solved

running a bat file from cold fusion

Posted on 2002-04-11
2
821 Views
Last Modified: 2013-12-24
Hi,

I need to run a batch file from cold fusion.
Say I have a bat file named boo.bat
I want to be able to run it with an argument like
boo.bat Test1
This will create a
Test1.reg file
I want to run this as well, the same as I would run it from a dos prompt.
Thanks.
0
Comment
Question by:simi
  • 2
2 Comments
 
LVL 19

Accepted Solution

by:
cheekycj earned 25 total points
ID: 6934445
You can only run Batch files on the server.  And to accomplish that use CFEXECUTE

http://livedocs.macromedia.com/cf50docs/CFML_Reference/Tags17.jsp

This was introduced in CF 4.5

Basic version:
<cfexecute
name="c:\boo.bat"
timeout="15">
</cfexecute>
Then run
<cfexecute
name="c:\Test1.reg"
timeout="15">
</cfexecute>



CJ

0
 
LVL 19

Expert Comment

by:cheekycj
ID: 6934913
Glad I could help.. Thanx for the "A".
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
remove Handler and Add Handler for one file 3 39
X-Frame-Options - click-jacking 7 56
Problem to go to page 12 82
How code a 301 redirect for folder files -> 1 file 2 23
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…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

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

27 Experts available now in Live!

Get 1:1 Help Now