連續執行命令用&&符號連接,如:
e: && cd e:\abc && dir
用vbs打開cmd並執行指定指令:
Set obj = createobject("wscript.shell")
obj.run "cmd /k e: && cd E:\aaa && dir"
打開資源管理器並定位到e:\aaa,若目錄不存在則定位到我的文檔:
Set obj = createobject("wscript.shell")
obj.run "cmd /c explorer e:\aaa"
%cd%表示當前目錄,explorer %cd%即打開當前目錄
iexplore表示ie,iexplore "www.baidu.com"打開百度
