shell.application拒绝了权限 [英] permission denied with shell.application

查看:512
本文介绍了shell.application拒绝了权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下javascript代码来运行notepade.exe:

I have following javascript code to run notepade.exe:

<SCRIPT type="text/javascript" LANGUAGE="JavaScript">  
  function executeCommands()
   {            
    var oShell = new ActiveXObject("Shell.Application");     
    var commandtoRun ="C:\WINDOWS\notepad.exe";
    oShell.ShellExecute(commandtoRun,"","", "open", "1");               
  }
</SCRIPT>

问题在于,当我运行脚本时,它会给出错误...权限被拒绝。

The problem is that, when i run the script then it give error..."Permission denied."

有人可以帮我解决这个问题吗?

Can anybody help me on this matter?

推荐答案

这是必须打开两个设置。

It's necessary to have two settings turned on.


  1. 为当前区域启用未签名的ActiveX控件
    < br $>
    工具> Internet选项>安全性>自定义级别...


    启用ActiveX控件和插件>初始化和编写未标记为的ActiveX控件脚本安全的脚本




  2. 允许活动内容运行文件


    工具> Internet选项>高级>安全
    启用允许活动内容在我的计算机上的文件中运行




    **确保关闭所有IE浏览器窗口。

  1. Enable unsigned ActiveX controls for the current zone
    Tools > Internet Options > Security > Custom level...
    Enable "ActiveX Controls and plug-ins" > "Initialize and script ActiveX controls not marked as safe for scripting"

  2. Allow Active Content to run files
    Tools > Internet Options > Advanced > Security Enable "Allow Active Content to run in files on My Computer"

    ** Make sure to close all your IE browser windows.

这篇关于shell.application拒绝了权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆