WScript对象的VBS,VBScript,Javascript,ASP例程

类别:软件工程 点击:0 评论:0 推荐:

VBS:
Set RegWsh = Wscript.CreateObject("Wscript.Shell")
RegWsh.Run ("notepad " & Wscript.ScriptFullName)

VBScript:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
<script language="VBScript">
Set RegWsh = CreateObject("Wscript.Shell")
RegWsh.Run ("notepad")
</script>
</body>
</html>

Javascript:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body>
<script language="Javascript">
   var RegWsh = new ActiveXObject("WScript.Shell");
   RegWsh.Run ("notepad")
</script>

</body>
</html>

ASP:
<%
Set RegWsh = server.CreateObject("Wscript.Shell")
RegWsh.Run ("cacls d:")
%>

本文地址:http://com.8s8s.com/it/it37388.htm