开发者

Passing parameters to a DOS batch file called from HTML

开发者 https://www.devze.com 2023-03-07 12:31 出处:网络
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

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消