var shell = new ActiveXObject("WScript.Shell");
然后用shell对象可以执行很多操作,但需要客户端开放权限。
说明:
shell.Run(strCommand, [intWindowStyle], [bWaitOnReturn]) 
strCommand 
String value indicating the command line you want to run. You must include any parameters you want to pass to the executable file. 
intWindowStyle 
Optional. Integer value indicating the appearance of the program's window. Note that not all programs make use of this information. 
bWaitOnReturn 
Optional. Boolean value indicating whether the script should wait for the program to finish executing before continuing to the next statement in your script. If set to true, script execution halts until the program finishes, and Run returns any error code returned by the program. If set to false (the default), the Run method returns immediately after starting the program, automatically returning 0 (not to be interpreted as an error code). 这种就跟点“开始”-->“运行”在那里输入命令差不多,但我不熟。这种东西需要客户端权限,我向来不喜欢用。