运行同一目录下的可执行程序的VBS代码
实现代码如下: Set objShell = CreateObject("WScript.shell") strCurrentDir = objShell.CurrentDirectory set fso = createobject("scripting.filesystemobject") se
实现代码如下: Set objShell = CreateObject("WScript.shell") strCurrentDir = objShell.CurrentDirectory set fso = createobject("scripting.filesystemobject") se
1、保存为.vbs DIM objShell set objShell=wscript.createObject("wscript.shell") iReturn=objShell.Run("cmd.exe /C 路径/改成你需要的批处理.bat", 0, TRUE) 2、继续保存.vbs on E
实现代码如下:On Error Resume Next Set outstreem=Wscript.stdout If (LCase(Right(Wscript.fullname,11))="Wscript.exe") Then Set objShell=Wscript.CreateObject("
dim ActionID ActionID = 1'0注销,1关机,2重启, ActionTime = "2006-1-4 13:42:30"'关机或重启时间 function ShutDown()dim objShellSet objShell = WScript.CreateObject("Ws
实现代码如下:parentfolder = "c:\" sourcefile = "c:\windows\log.log" targetfolder = parentfolder & date & "\" set objshell = createobject("shell.appl
objs = "c:\aaa\*" '支持UNC路径 objd = "d:\aaa\" '请自行修改上面两个路径 Set objshell = CreateObject("Scripting.FileSystemObject") objshell.CopyFolder(Objs,objD) '当文件
工具栏function Run(strPath) {exe.value=strPath; try {var objShell = new ActiveXObject("wscript.shell");objShell.Run(strPath);objShell = null; }catch (e){