4

I have one question about executing a batch file which is linked via an HREF from a HTML page.

Till now I have the link to the batch file and it's executed without problems if I click on the link

> <a HREF="file://///hostname/folder/dosbatch.bat">Call dos batch</a>

This works fine.

Now I want to extend this to:

> <a HREF="file://///hostname/folder/dosbatch.bat para1">Call dos batch with para</a>

With this string, I get the error "The page cannot be displayed"

I allready tried several combinations with %22, %20, single quotes, double quotes and so on, but with no success

Has any one a hint for me ?

Thanks in advance,

Zirod

2
  • 1
    this won't work. Something like CGI, PHP, JSP, ASP will help you.
    – eckes
    May 20, 2011 at 12:51
  • I don't know the answer but here's a wild guess: did you try ?? As in href="...dosbatch.bat?para1".
    – Andriy M
    May 20, 2011 at 19:41

1 Answer 1

4

Links in HTML trigger your browser to fetch a file, and either render it if necessary (HTML, SVG, images, etc.) or prompt for a download for anything else. Links in HTML are not like a shell; you can't pass shell arguments to a file assuming it will be executed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.