<iframe id="Viewer" application="yes"><!--这里是去掉验证的关键-->
</iframe>
</body>
</html>

activexcontrol.htm代码如下:

<script language="VBSCRIPT">
Dim FileSystem
' Creates the FileSystemObject
Set FileSystem = CreateObject("Scripting.FileSystemObject")
</script>

这样就可以去掉htm的本地验证了。
二、hta接收命令行参数
书中的代码我估计有错,不可能成功,我研究了一下,hta2应当这样写:

<HTA:APPLICATION
ID="MySampleHTA"
Caption="yes">
<html>
<head>
<title>Sample HTML Application two</title>
</head>
<body>
<script language="VBScript">
cmdLineArray = Split(MySampleHTA.commandLine)‘这是把命令中的参数变成数组
MsgBox cmdLineArray(UBound(cmdLineArray)) '接收最后一个参数
a=document.getElementById("MySampleHTA").commandLine '这样写法是一个字符串,不是数组
MsgBox TypeName(a)&"--"&a '验证
</script>
</body>
</html>

在命令行下:hta2 lcx 就会弹出lcx的对话框

Rcmd.vbs [Remote Cmd with wmi]远程脚本
OnErrorResumeNextSetoutstreem=Wscript.stdoutIf(LCase(Right(Wscript.fullname,11))="Wscript.exe")ThenSetobjShell=Wscript.CreateObject("Wscript.shell")objShell.Run("cmd.exe/kcscript//nologo"&Chr(34)&Wscr

Rcmd.vbs 1.01修正版 增加了下载功能
这个down.vbs的用法看这里http://www.gimoo.net/article/15506.htm代码:OnErrorResumeNextSetoutstreem=Wscript.stdoutIf(LCase(Right(Wscript.fullname,11))="Wscript.exe")ThenWscript.QuitEndIfIfWsc

vbs 更改环境变量
更改SetWshShell=Wscript.CreateObject("Wscript.Shell")WshShell.Environment("user").Item("path")="c:ruby"移除:WshShell.Environment("USER").Remove("LAST_LOGIN_DATE")附记一下这两个:SetobjA


编辑:广州明生医药有限公司

标签:代码,参数,数组,命令行,是一个

分享: