windows vbs啟動多個應用程序並使程序最小化(顯示桌面)
CreationTime--2018年7月26日11點18分
Author:Marydon
1.應用場景
每天開機后,都需要打開平常所需要的軟件,又不想將程序設為開機啟動,能不能開機后,同時啟動多個程序呢?
2.代碼實現
第一步:新建一個文本文件
桌面-->右鍵-->新建-->文本文檔-->雙擊打開
第二步:編輯命令
語法:
Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run """你的應用程序的絕對路徑"""
Dim shell Set shell = CreateObject("WScript.Shell") '1.啟動qq shell.Run """E:\TIM-x86\Bin\TIM.exe""" '2.啟動chrome shell.Run """E:\ChromePortable-65-PE\App\Google Chrome\chrome.exe""" '3.啟動eclipse shell.Run """D:\eclipse-2018-x86\eclipse.exe""" '4.啟動notepad++ shell.Run """D:\Notepad++-7.3-PE\notepad++.exe""" '5.顯示桌面 Set shell = CreateObject("Shell.Application") shell.ToggleDesktop '6.將變量置空 這一步可以不要 Set shell = Nothing
說明:雖然vbs有最小化的命令,但是效果不明顯,因此,第5,6步相當於沒有起作用,可以忽略。
第三步:文件-->另存為-->vbs文件
第四步:刪除剛才新建的txt文件
以后直接雙擊運行即可