Created
October 9, 2018 05:52
-
-
Save jymcheong/29290a064c3921e78020b8b55f819fd4 to your computer and use it in GitHub Desktop.
Auto Run All EXEs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <File.au3> | |
#Include <WinAPI.au3> | |
#Include <WindowsConstants.au3> | |
Func Win_R($fullpath) | |
$splitArray = StringSplit($fullpath,"\") | |
$arraySize = UBound($splitArray) | |
Send("#r") | |
WinWait("Run", "", 10) | |
Send($fullpath & "{ENTER}") | |
Sleep(1000) | |
ProcessClose($splitArray[$arraySize - 1]) | |
Sleep(2000) | |
Send("#d") | |
Sleep(100) | |
EndFunc | |
$file = "EXEs.txt" | |
FileOpen($file, 0) | |
For $i = 1 to _FileCountLines($file) | |
$line = FileReadLine($file, $i) | |
Win_R($line) | |
Next | |
ConsoleWrite("all done") | |
FileClose($file) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related to https://gist.github.com/jymcheong/6c70d06a883db7ecb06748239e039960