Jump to content

Retrieve Information From A File !


Recommended Posts

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

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

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=25859

EDIT:

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 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

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

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=824686

Several 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...