Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

running a bat file from cold fusion

Posted on 2002-04-11
2
Medium Priority
?
870 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 100 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
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.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month6 days, 16 hours left to enroll

782 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