是否可以在没有ActiveXObject的情况下运行exe? [英] Is it possible to run an exe without ActiveXObject?
本文介绍了是否可以在没有ActiveXObject的情况下运行exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的代码
< script type = text / javascript lang = javascript >
函数TestRun(){
var RunFile = new ActiveXObject(WScript.Shell);
RunFile.ShellExecute(c:/windows/system32/notepad.exe,1,false);
}
< / script >
< input id =btnScantype =buttonvalue =Scanonclick = 测试运行(); />
提前致谢
解决方案
No.
为什么不呢?因为如果你能做到这一点,恶意网站也是如此。这就是为什么ActiveX现在默认为关闭而没有人安装它们 - 因为它们被用于恶意目的。
你想要运行NotePad:那边的人想要运行FDISK ...
Here is my code
<script type="text/javascript" lang="javascript">
function TestRun() {
var RunFile = new ActiveXObject("WScript.Shell");
RunFile.ShellExecute("c:/windows/system32/notepad.exe", 1, false);
}
</script>
<input id="btnScan" type="button" value="Scan" onclick="TestRun();" />
Thanks in advance
解决方案
No.
Why not? Because if you could do it, so could malicious sites. And that's why ActiveX now defaults to OFF and nobody installs them - because they were used for malicious purposes.
You want to run NotePad: that guy over there wants to run FDISK...
这篇关于是否可以在没有ActiveXObject的情况下运行exe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文