标题: [问题求助] 复制文件完整路径的VBS怎样延时运行指定程序?9解决) [打印本页]
作者: 我来了 时间: 2013-7-18 18:14 标题: 复制文件完整路径的VBS怎样延时运行指定程序?9解决)
本帖最后由 我来了 于 2013-8-2 12:30 编辑
把这个
复制文件完整路径的.vbs
if wscript.arguments.count=0 then
wscript.echo "请将文件拖放到本脚本上!"
wscript.quit
end if
dim fso,f
set fso = wscript.createobject("scripting.filesystemobject")
Set f = fso.GetFile(WScript.Arguments(0))
Set wsShell = CreateObject("WScript.Shell")
wsShell.Run "mshta vbscript:ClipboardData.SetData("&chr(34)&"text"&chr(34)&"," &Chr(34)& f&Chr(34)& ")(close)",0,True
set f = nothing
set fso = nothing
set wsshell = nothing
行尾巴处:加上一条,延迟5秒钟,
加上一条,运行c:\test.exe
作者: weichenxiehou 时间: 2013-7-18 21:01
- ......
- WScript.Sleep 5000
- wsShell.Run("C:\test.exe",0,true)
- set wsShell=nothing '将上面这一句删掉
复制代码
欢迎光临 批处理之家 (http://bathome.net./) |
Powered by Discuz! 7.2 |