Computing.Net > Forums > Web Development > run bat file from hyperlink HOW?

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

run bat file from hyperlink HOW?

Reply to Message Icon

Name: monkeyan
Date: November 17, 2004 at 05:40:21 Pacific
OS: Win XP/2003
CPU/Ram: N/A
Comment:

I have IIS running on Windows 2003 server successfully. I am trying to run a batch file from a hyperlink, and whe I try it just comes up with a Page cannot be found HTTP error 404. here is an example of the command

in a table

td a href="ping.bat" /a>192.168.0.1

I took out most of the brackets as the post didn't seem to display the command properly with all of the brackets added.

All I want is for the batch file to run and ping the server at address 192.168.0.1, I can't understand why it won't run the batch file, any ideas?

If you do know why, can it be run without a prompt for action also?

Regards

Kevin



Sponsored Link
Ads by Google

Response Number 1
Name: Jamie_McCoy
Date: November 18, 2004 at 10:55:17 Pacific
Reply:

if you click that in a webpage, alls that would happen is it ask you whether you want to save or open the file

if you clicked open, it would simply run on your machine, not the webserver

however, their is a system function in PHP which takes care of MSDOS bases commands

u mite wanna look into that


Jaydiocity.co.uk


0

Response Number 2
Name: FBI Agent
Date: November 19, 2004 at 07:52:00 Pacific
Reply:

im actually currently doing that on part of my website. i dont know how the script goes, but if i remember on monday since im gonna be busy on the weekend, i'll show ya the code that i have for it and you can just add that in yours. oh, and yeah, you need to have php.

FBI Agent

AIM: EliteAssassin187


0

Response Number 3
Name: FBI Agent
Date: November 23, 2004 at 08:14:40 Pacific
Reply:

lol, wait... it wasnt supposed to be that hard. the only thing you need to do is have the batch file called ping.bat go:

ping 192.168.0.1

put the batch file in the correct directory and have the html file in the table go:

[a href="ping.bat"]192.168.0.1[/a]

i dont know what this is supposed to accomplish. im assuming you have some sort of server-side scripting to extract the code from the batch file (that is what i was looking for over the weekend). but then i remembered all you needed was how to make that a link, and it's simple, you just link to the batch file.

FBI Agent

AIM: EliteAssassin187


0

Response Number 4
Name: monkeyan
Date: November 25, 2004 at 07:26:41 Pacific
Reply:

Hi, I tried this first of all and just got a page not displayed screen.

Thanks for your help tho.

Kev


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: run bat file from hyperlink HOW?

Run file from cgi-bin webserber www.computing.net/answers/webdevel/run-file-from-cgibin-webserber/2621.html

Downloading a file from mysql www.computing.net/answers/webdevel/downloading-a-file-from-mysql/2373.html

Run ASP files locally www.computing.net/answers/webdevel/run-asp-files-locally/3199.html