Vier Posted May 15, 2006 Share Posted May 15, 2006 I woulf like retrieve many information from a specific file : Windows KB files. With Rightclic on a file in "version" tab, many information exist, I would like retrieve Kb Article Number ! I don't know to make it ? Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 15, 2006 Share Posted May 15, 2006 I woulf like retrieve many information from a specific file : Windows KB files. With Rightclic on a file in "version" tab, many information exist, I would like retrieve Kb Article Number ! I don't know to make it ? HI, hmmh I don't know what kb Article Number is, but maybe this helps a little bit. $path = @DesktopDir & "\AutoitVersion.exe"; put your path here! If FileExists($path) Then $t = FileGetTime($path, 1);1 = created If Not @error Then $yyyymd = $t[0] & "/" & $t[1] & "/" & $t[2] MsgBox(64, "File Info", FileGetAttrib($path) & @CR & FileGetVersion($path) _ & @CR & FileGetLongName($path) & FileGetShortcut($path) & @CR & FileGetSize($path) & " Bytes" & @CR & _ "created : " & $yyyymd) EndIf So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Vier Posted May 15, 2006 Author Share Posted May 15, 2006 "kb Article Number" is a line information in advanced options in right clic properties : "version" Link to comment Share on other sites More sharing options...
Simucal Posted May 15, 2006 Share Posted May 15, 2006 (edited) Can you supply a file with a KB article number in its property?I wrote this awhile ago. It is able to get a lot of the information in the Advanced Properties tab. Get Extended Property: http://www.autoitscript.com/forum/index.php?showtopic=25859EDIT:If the KB article number is in the version property you would do:#include <extprop.au3> $path = FileOpenDialog("Select a file to read attributes",@ScriptDir,"All (*.*)") $prop = _GetExtProperty($path,34) MsgBox(0,"KB Aritcle Number:", "Property #34: "&$prop&@CRLF) Edited May 15, 2006 by Simucal AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Vier Posted May 15, 2006 Author Share Posted May 15, 2006 An example : KB from microsoftI test your script but my information is no retrieve. My information is language and KB number ! Link to comment Share on other sites More sharing options...
Simucal Posted May 15, 2006 Share Posted May 15, 2006 Yea, it seems like Microsoft is using a weird property system for those files. However, the country code and the KB Article number are right there in the file name name. Just parse the file name for the two things you need. #include <array.au3> $path = FileOpenDialog("Select a file to read attributes",@ScriptDir,"All (*.*)") $filename = StringTrimLeft($path,StringInStr($path, "\", 0, -1)) $Kb = StringMid($filename, (StringInStr($filename, "KB", 0)+2), 6) $Country = StringTrimRight(StringTrimLeft($filename, (StringLen($filename)-7)), 4) MsgBox(0, "Info", "KB: "&$Kb&@CRLF&"Country: "&$Country) AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Vier Posted May 15, 2006 Author Share Posted May 15, 2006 I know, but if file is rename ! Link to comment Share on other sites More sharing options...
Simucal Posted May 15, 2006 Share Posted May 15, 2006 I've been looking around trying to find a way to retrieve those extended file properties... but have yet to find anything.This MSDN describes its structure but it is of no help to our current problem:http://support.microsoft.com/?kbid=824686Several pages talk about retreiving KB numbers of already installed patches.. but nothing about how to access that file property.I'll look some later but it isnt looking good so far on my end. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Vier Posted May 15, 2006 Author Share Posted May 15, 2006 ok, thanks for your job ! 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