Discussion Locked

Execute a .bat file using HTML

0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Any gurus out there know how to use HTML to execute a .bat file for automated testing? I am not well versed in HTML.

John

1 reply

by jay eckles

If you're looking to run a batch file on the client, and you know exactly where that batch file exists on the client machine, it's conceivable you could do it by creating a hyperlink like this:

Execute Batch

and then have the user click on the link. You might also be able to write some javascript to click() on the link and call that Javascript in the onLoad event handler if you want to automate it. This suggestion will probably only work on IE if it works at all.

If you want to execute a batch file on the server, you'll not be able to do that with HTML. You can create a CGI on the web server that executes the batch. Then an HTML form could call the CGI program. That would be the best way to do that.

Good luck.

Jay
www.jayeckles.com

This discussion is closed to new replies.