Log in

View Full Version : Activating Command Prompt script through HTML form



Moloch
09-07-2006, 02:44 PM
Good day,

I am trying to integrate my batch file into a basic web based form in HTML. Now, my page is not server side, does not use php, just plain html. First, I am wondering if the command prompt within Windows can be opened and run a small script within HTML forms?

If its possible, I am trying to integrate my current batch file which has the following code:



@echo off
grep --mmap -w %1 d:\int\* |sort /+20 > %1.sl
"c:\program files\windows nt\accessories\wordpad.exe" %1.sl
del %1.sl


In big, this is a script that searches information inputted ( %1 ) within specified files and then prompts the information found in WordPad and then deletes the temp file when you close the WordPad window.

If the above is possible to insert within an HTML form either with JavaScript’s or other non-server side scripting, I would be interested to learn.

Thank you for your help towards this problem.

ItsMeOnly
09-07-2006, 08:03 PM
Basically that's impossible: it would be severe breach of security a web browser would allow "remote" execution of standalone program (read: until recently IE had that, but after several breakups and DoS, they issued a fix for that)

You can however build ActiveX control that would embed wordpad into IE (not sure if FF woule ever allow to do that)...

Moloch
09-07-2006, 11:31 PM
Thank you for your reply.

I wasn't sure if it was possible or not, well, I was hoping that it would be possible to do so :-)