Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
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

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

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

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

Hi, I tried this first of all and just got a page not displayed screen.
Thanks for your help tho.
Kev

![]() |
![]() |
![]() |

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