我想使用asp启动服务器端的notepad,下面是msdn里面的一个例子
Example
' This fragment launches Notepad with the current executed script
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run ("notepad " & Wscript.ScriptFullName)
WshShell.Run ("windir/notepad" & Wscript.ScriptFullName)
然而出现了下面的一个错误提示
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'Wscript'
是不是我还要建立wscript的对象还是别的原因呢?
希望能得到大家的指点。
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:34:16Z 得分:0
?
大家帮帮忙吧
Top
回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:38:29Z 得分:0
?
Set WshShell = Server.CreateObject("Wscript.Shell")
Top
回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:39:32Z 得分:0
?
<script language=vbscript>
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run ("notepad")
</script>
Top
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:52:32Z 得分:0
?
您好,我的浏览器的提示是
ActiveX component can't create the object 'wscript.shell'
我例子上面也用同样方法来建立那个wscript对象。
但也是不行,是不是服务器又要设置什么的,我的是英文版的xp+iis
btw:这种方法是用来启动Server还是Client的程序的呢?
Top
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 10:01:22Z 得分:0
?
我把internet options里面的Security的initilize and script Activex controls not marked as safe 设为了Enable之后就可以运行了。
但那就是说只是启动了Client端的程序,而不能启动Server端的程序了?
主 题: 如何创建Wscript对象呢?
我想使用asp启动服务器端的notepad,下面是msdn里面的一个例子
Example
' This fragment launches Notepad with the current executed script
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run ("notepad " & Wscript.ScriptFullName)
WshShell.Run ("windir/notepad" & Wscript.ScriptFullName)
然而出现了下面的一个错误提示
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'Wscript'
是不是我还要建立wscript的对象还是别的原因呢?
希望能得到大家的指点。
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:34:16Z 得分:0
?
大家帮帮忙吧
Top
回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:38:29Z 得分:0
?
Set WshShell = Server.CreateObject("Wscript.Shell")
Top
回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:39:32Z 得分:0
?
<script language=vbscript>
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run ("notepad")
</script>
Top
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:52:32Z 得分:0
?
您好,我的浏览器的提示是
ActiveX component can't create the object 'wscript.shell'
我例子上面也用同样方法来建立那个wscript对象。
但也是不行,是不是服务器又要设置什么的,我的是英文版的xp+iis
btw:这种方法是用来启动Server还是Client的程序的呢?
Top
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 10:01:22Z 得分:0
?
我把internet options里面的Security的initilize and script Activex controls not marked as safe 设为了Enable之后就可以运行了。
但那就是说只是启动了Client端的程序,而不能启动Server端的程序了?
主 题: 如何创建Wscript对象呢?
我想使用asp启动服务器端的notepad,下面是msdn里面的一个例子
Example
' This fragment launches Notepad with the current executed script
Set WshShell = Wscript.CreateObject("Wscript.Shell")
WshShell.Run ("notepad " & Wscript.ScriptFullName)
WshShell.Run ("windir/notepad" & Wscript.ScriptFullName)
然而出现了下面的一个错误提示
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'Wscript'
是不是我还要建立wscript的对象还是别的原因呢?
希望能得到大家的指点。
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:34:16Z 得分:0
?
大家帮帮忙吧
Top
回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:38:29Z 得分:0
?
Set WshShell = Server.CreateObject("Wscript.Shell")
Top
回复人: net_lover(孟子E章) ( ) 信誉:847 2003-04-27 09:39:32Z 得分:0
?
<script language=vbscript>
Set WshShell = CreateObject("Wscript.Shell")
WshShell.Run ("notepad")
</script>
Top
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 09:52:32Z 得分:0
?
您好,我的浏览器的提示是
ActiveX component can't create the object 'wscript.shell'
我例子上面也用同样方法来建立那个wscript对象。
但也是不行,是不是服务器又要设置什么的,我的是英文版的xp+iis
btw:这种方法是用来启动Server还是Client的程序的呢?
Top
回复人: chikin(饭饭) ( ) 信誉:81 2003-04-27 10:01:22Z 得分:0
?
我把internet options里面的Security的initilize and script Activex controls not marked as safe 设为了Enable之后就可以运行了。
但那就是说只是启动了Client端的程序,而不能启动Server端的程序了?
|