CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
山寨机中的战斗机! 程序优化工程师到底对IT界有没有贡献
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  .NET技术 >  ASP.NET

为什么var wsh=new ActiveXObject("WScript.Shell");不成功?(在线解决就送分)

楼主cooldht(╆编编╇)2002-12-24 09:01:55 在 .NET技术 / ASP.NET 提问

var   wsh=new   ActiveXObject("WScript.Shell");  
  运行页面时,调用这句话时出现如下错误:  
  错误:找不到指定的程序。  
  调试时运行到这句话时弹出对话框说:未知的异常  
  windows   2000   pro,IIS   5.0,IE6.0 问题点数:50、回复次数:13Top

1 楼cooldht(╆编编╇)回复于 2002-12-24 09:12:03 得分 0

UPTop

2 楼saucer(思归)回复于 2002-12-24 09:35:00 得分 10

are   you   sure   "错误:找不到指定的程序"   is   caused     by   this   line   or   the   run()   method?   if   it   is   the   latter,   make   sure   the   path   is   correct  
   
  are   you   running   it   on   the   client   side?   lower   the   ActiveX   security   settingsTop

3 楼qiushuiwuhen(秋水无恨)回复于 2002-12-24 09:41:03 得分 10

要注意几点:  
  1.run不支持长文件名  
  2.还有\在js中要写成\\Top

4 楼cooldht(╆编编╇)回复于 2002-12-24 10:13:53 得分 0

我已经将ActiveX   security   降到最低。  
  有一段代码  
  直接在资源管理器用IE打开,没错,弹出记事本窗口  
  但在IIS中运行就出错,错误:你没有权限  
  <html>  
  <script   language="javascript">  
  <!--  
  function   RunCmd()  
  {  
      var   shl=new   ActiveXObject("Shell.Application");  
      //shl.Run("notepad.exe");  
  shl.ShellExecute("notepad.exe");  
  }  
  //-->  
  </script>  
  <body   onload="RunCmd();">  
  </body>  
  </html>Top

5 楼saucer(思归)回复于 2002-12-25 00:38:09 得分 10

enable   the   ActiveX   security   setttings   for   the   zone   where   your   IIS   is   in,   "Initialize   and   script   ActiveX   controls   not   marked   as   safe"   in   particular  
   
  for   example,   if   the   IIS   is   on   your   machine,   change   the   settings   for   Local   Intranet.   If   the   IIS   is   on   the   internet,   change   the   settings   for   InternetTop

6 楼cooldht(╆编编╇)回复于 2002-12-25 09:18:07 得分 0

saucer:  
  I   did   as   you   said   above!    
  In   my   owen   computer(IE6.0)   ,error:  
  but   in   other   computer   at   the   Intranet(IE6.0)   ,succeed!  
  Top

7 楼cooldht(╆编编╇)回复于 2002-12-25 09:22:59 得分 0

the   error   is:"错误:没有权限Top

8 楼cooldht(╆编编╇)回复于 2002-12-25 09:33:14 得分 0

I   make   a   mistake   when   I   set     ActiveX   security!  
  Thank   You   a   Lot!Top

9 楼denghaitao()回复于 2002-12-25 09:38:05 得分 0

UP  
  Top

10 楼denghaitao()回复于 2002-12-25 09:39:08 得分 5

But   when   I   use    
  var   wsh=new   ActiveXObject("WScript.shell");  
  error:错误:Automation   服务器不能创建对象Top

11 楼saucer(思归)回复于 2002-12-25 09:50:07 得分 10

change   the   security   settings   for   that   zone   or   add   the   site   to   your   Trusted   Sites   in   Tools->Internet   Options->SecurityTop

12 楼online(龙卷风V4.0--决战江湖(MS MVP-VB))回复于 2002-12-25 18:05:58 得分 5

安装wsh6.5Top

13 楼cooldht(╆编编╇)回复于 2002-12-31 11:32:26 得分 0

正如思归所说!Top

相关问题

  • ActiveXObject
  • ActiveXObject
  • var oXL=new ActiveXObject("Excel.Application")错在何处?在线等
  • 关于WSH的
  • 关于 ActiveXObject ........
  • 怎样使用WSCRIPT,
  • var testdate = new Date();
  • 急救!activexobject如何定义
  • 关于Wscript的学习
  • 关于ActiveXObject的问题

关键词

  • shell
  • activex
  • iis
  • security
  • ie
  • wscript
  • 错误
  • 弹出
  • 这句话
  • 运行

得分解答快速导航

  • 帖主:cooldht
  • saucer
  • qiushuiwuhen
  • saucer
  • denghaitao
  • saucer
  • online

相关链接

  • CSDN .NET频道
  • .NET类图书
  • C#类图书
  • .NET类源码下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo