VBS 自動打開軟件


VBS 自動打開軟件   點擊 軟件   關閉進程方法!

Dim WshShell, QQPath                            
                                    

QQPath="C:\TM ACv6\TMAC.exe" '需要打開的軟件路徑
Set WshShell=WScript.CreateObject("WScript.Shell") 
path = Chr(34) & QQPath & Chr(34) '去除路徑空格
WshShell.Run path,1

WScript.Sleep 10000  '等待1秒鍾
WshShell.sendkeys "%{ESC}"      '選中當前路徑的界面             
WshShell.AppActivate "Technitium MAC Address Changer v6 - by Shreyas Zare"  '需要激活的軟件框標題名稱
WshShell.sendkeys "{enter}"

WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{ENTER}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{TAB}" 
WshShell.SendKeys "{ENTER}" 
WScript.Sleep 3000 
WshShell.SendKeys "{ENTER}" 
WScript.Sleep 3000 
CreateObject("WScript.Shell").Run "taskkill /f /im TMAC.exe", 0   'TMAC.exe  為需要關閉的進程名稱
 
        

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM