View previous topic :: View next topic |
Author |
Message |
msmollison -
Joined: 24 Feb 2004 Posts: 15
|
Posted: Thu Mar 18, 2004 4:08 am Post subject: How do I allow users to execute server-side batch files? |
|
|
I want a user to be able to click a link that will execute a batch file on my server, just like how a cgi file would work. I tried using cmd.exe as a CGI interpreter with extensions bat, but I get error 500 when i click on a .bat file link. Can anyone help me? I have heard that Apache will do this automatically for you...
My site is at msm33.hopto.org I have lost my Powered by Abyss logo, if anyone can link me to one I will put it up there... |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Thu Mar 18, 2004 6:52 am Post subject: |
|
|
All I can help you with is this
 |
|
Back to top |
|
 |
Omar G -
Joined: 21 Mar 2003 Posts: 34 Location: Honolulu, Hawai'i
|
Posted: Thu Mar 18, 2004 1:49 pm Post subject: |
|
|
Use Server side includes. Make a file called batch.shtml or whatever, and add a directive <!--#exec virtual="path to batch file" --> and the batch file should return its output, in raw text, to your page. Note, however, this is extremely risky to do on the open internet. SSI has absolutely no security as would a good CGI. People could spoof a url to your batch file and pass commands to it, such as "format C:", which would be really, really bad: it erases your harddrive...
- Omar G |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Mar 18, 2004 6:01 pm Post subject: Re: How do I allow users to execute server-side batch files? |
|
|
msmollison,
Please contact support@aprelium.com to get a batch file wrapper. It will help you running your BAT files as any other CGI script. _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Thu Mar 18, 2004 11:51 pm Post subject: |
|
|
Why can't you just use a CGI script instead? _________________ Bienvenidos! |
|
Back to top |
 |
 |
msmollison -
Joined: 24 Feb 2004 Posts: 15
|
Posted: Fri Mar 19, 2004 2:40 am Post subject: |
|
|
Because I don't know CGI, but I know MS-DOS batch language, and I want to do some very specific tasks. |
|
Back to top |
|
 |
iNaNimAtE -
Joined: 05 Nov 2003 Posts: 2381 Location: Everywhere you're not.
|
Posted: Sun Mar 21, 2004 5:49 am Post subject: |
|
|
Too bad. I'de start reading up on perl, it will get you farther. _________________ Bienvenidos! |
|
Back to top |
 |
 |
|