Sardith Posted December 16, 2005 Share Posted December 16, 2005 Is there a way to get a .exe info? Like its title and such? [font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font] Link to comment Share on other sites More sharing options...
Valuater Posted December 16, 2005 Share Posted December 16, 2005 i wrote this a while back... but i think jefhall ( not sure ) was working on a larger project expandcollapse popup#include <Array.au3> Dim $hFile3A , $hFile3B , $prog[10], $details[10] ; List all processes $list = ProcessList() for $i = 1 to $list[0][0] #Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Yes, No, and Cancel, Icon=Question If Not IsDeclared("iMsgBoxAnswer") Then Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(35,"Process Information","Press *Yes* to get Process information for " & @CRLF & @CRLF & $list[$i][0] & @CRLF & @CRLF & "Press *No* to see the next Process " & @CRLF) Select Case $iMsgBoxAnswer = 6;Yes SplashTextOn("Searching", @CRLF & "... Please Wait ...", 240, 60) Call("Get_info") Case $iMsgBoxAnswer = 7;No Case $iMsgBoxAnswer = 2;Cancel Exit EndSelect #EndRegion --- CodeWizard generated code End --- next Func Get_info() RunWait(@ComSpec & ' /c ' & 'dir "' & @HomeDrive & "\" & $list[$i][0] & '" /a :h /b /s' & ' > "' & @TempDir & "\dir_" & $i & ".txt", '', @SW_HIDE) Sleep(2000) $hFile = FileOpen(@TempDir & "\dir_"& $i &".txt", 1) ; Check if file opened for writting OK If $hFile = -1 Then MsgBox(0, "Write Error 1", "Unable to open file.") EndIf FileWriteLine($hFile, " ") FileWriteLine($hFile, "File Name: " & $list[$i][0]) FileWriteLine($hFile, "File ID: " & $list[$i][1]) $ver = FileGetVersion($list[$i][0]) FileWriteLine($hFile, "Version: " & $ver) FileWriteLine($hFile, " ") FileClose($hFile) $result = StringReplace($list[$i][0], "exe", "lnk") RunWait(@ComSpec & ' /c ' & 'dir "' & @HomeDrive & "\" & $result & '" /a :h /b /s' & ' > "' & @TempDir & "\Link_" & $i & ".txt", '', @SW_HIDE) Sleep(2000) $hFile2 = FileOpen(@TempDir & "\Link_"& $i &".txt", 0) ; Check if file opened for reading OK If $hFile2 = -1 Then MsgBox(0, "Read Error 2", "Unable to open file.") EndIf $sLine = FileReadLine($hFile2) FileClose($hFile2) If FileExists($sline) Then $hFile3A = FileOpen(@TempDir & "\dir_"& $i &".txt", 1) ; Check if file opened for writting OK If $hFile3A = -1 Then MsgBox(0, "Write Error 3A", "Unable to open file.") EndIf FileWriteLine($hFile3A, "Link info found**") $prog = FileGetShortcut($sline) For $t = 0 to 6 Sleep(200) FileWriteLine($hFile3A, $prog[$t]) Next FileClose($hFile3B) Else $hFile3B = FileOpen(@TempDir & "\dir_"& $i &".txt", 1) ; Check if file opened for writting OK If $hFile3B = -1 Then MsgBox(0, "Write Error 3B", "Unable to open file.") EndIf FileWriteLine($hFile3B, "No link info found") FileClose($hFile3B) EndIf SplashOff() RunWait('Notepad "' & @TempDir & "\dir_"& $i &".txt"); for testing EndFunc 8) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now