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

来源:互联网 发布:露水河 怎么样 知乎 编辑:程序博客网 时间:2024/05/22 01:49

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:")
%>

原创粉丝点击