;~ scan all drives for autorun.inf #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Users\alexander\Documents\AutoIt\projects\AntiVir\Forms\autorun_editor.kxf $Form1 = GUICreate("Autorun.inf Scanner // by AutoProgramming", 635, 444, 193, 125) $Edit1 = GUICtrlCreateEdit("", 8, 40, 617, 393) $CButton = GUICtrlCreateButton("Close", 8, 8, 75, 25, 0) $IButton = GUICtrlCreateButton("Search for autorun.inf", 96, 8, 131, 25, 0) $RCheckbox = GUICtrlCreateCheckbox("Search Removable Drives?", 240, 16, 169, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $IButton GUICtrlSetData($Edit1, "") If GUICtrlRead($RCheckbox) = 1 Then GetAll("removable") EndIf GetAll("fixed") GetAll("cdrom") Case $CButton Exit EndSwitch WEnd GetAll("fixed") GetAll("cdrom") Func GetAll($type) $var = DriveGetDrive($type) If NOT @error Then For $i = 1 to $var[0] $path = $var[$i] & "\autorun.inf" If FileExists($path) Then GUICtrlAddData($Edit1, "--------------------------------------------------" & @CRLF) GUICtrlAddData($Edit1, "Autorun.inf @ " & $path & @CRLF) GUICtrlAddData($Edit1, "--------------------------------------------------" & @CRLF) $autorun = FileRead($path) GUICtrlAddData($Edit1, $autorun) GUICtrlAddData($Edit1, @CRLF & @CRLF) EndIf Next EndIf EndFunc Func GUICtrlAddData($GUIElement, $Data) GUICtrlSetData($GUIElement, GUICtrlRead($GUIElement) & $Data) EndFunc
I think it's quite self-explainig -> This tool searches for autorun.inf in all drives and displays its content. Enjoy.










