在客户端计算机上运行Bat文件 [英] Run Bat file on Client machine
本文介绍了在客户端计算机上运行Bat文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在不使用activeX控件的情况下使用ASP.net(javascript / requireJS)在按钮点击事件上在客户端计算机上运行bat(exe)文件。
问候,
Saad
Hi,
I want to run a bat(exe) file on client machine on button click event by using ASP.net(javascript/ requireJS) without using activeX control.
Regards,
Saad
推荐答案
你不能。
你可以用ActiveX做到这一点,但即使这样也行不通,除非在极少数情况下。
这是故意的:如果你可以运行一个批处理文件恶意网站也是如此。你可以想象他们的批处理文件会开始做什么!所以为了安全起见,Javascript无法做到。
You can't.
You can do it with ActiveX, but even that doesn't work except in a very few circumstances.
This is deliberate: if you could run a batch file, so could malicious sites. And you can imagine what their batch files would start doing! So for security, Javascript cannot do it.
这篇关于在客户端计算机上运行Bat文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文