Jump to content
Sign in to follow this  
Quirrell

GetExtProperty attribute not working in GUI

Recommended Posts

Quirrell

I am trying to use the GetExtProperty attribute to list the fileversions for dll files, but when I but the attribute in (32) I get a return value of 0 for all files.

What Gives?

I Have Uploaded the file for examination if someone would be so kind

Thankyou

FileList_dllUploaded.au3

Share this post


Link to post
Share on other sites
Xenobiologist

HI,

#include<Array.au3>
Global $filePath = @WindowsDir & '\System32\calc.exe'
Global $info = _getFileInfo($filePath)

If Not IsArray($info) Then
    MsgBox(16, 'Error', 'File not found!')
    Exit (0)
EndIf

_ArrayDisplay($info, 'FileInfo')

Func _getFileInfo($path)
    If Not FileExists($path) Then Return -1
    Local $info_A[12]
    Local $string_A[12] = ['FileVersion', 'FileDescription', 'LegalCopyright', 'Comments', 'InternalName', _
            'ProductName', 'CompanyName', 'ProductVersion', 'LegalTrademarks', 'PrivateBuild', 'OriginalFilename', 'SpecialBuild']
    For $i = 0 To UBound($info_A) - 1
        $info_A[$i] = FileGetVersion($path, $string_A[$i])
    Next
    Return $info_A
EndFunc   ;==>_getFileInfo

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

Share this post


Link to post
Share on other sites
Quirrell

HI,

#include<Array.au3>
Global $filePath = @WindowsDir & '\System32\calc.exe'
Global $info = _getFileInfo($filePath)

If Not IsArray($info) Then
    MsgBox(16, 'Error', 'File not found!')
    Exit (0)
EndIf

_ArrayDisplay($info, 'FileInfo')

Func _getFileInfo($path)
    If Not FileExists($path) Then Return -1
    Local $info_A[12]
    Local $string_A[12] = ['FileVersion', 'FileDescription', 'LegalCopyright', 'Comments', 'InternalName', _
            'ProductName', 'CompanyName', 'ProductVersion', 'LegalTrademarks', 'PrivateBuild', 'OriginalFilename', 'SpecialBuild']
    For $i = 0 To UBound($info_A) - 1
        $info_A[$i] = FileGetVersion($path, $string_A[$i])
    Next
    Return $info_A
EndFunc   ;==>_getFileInfo

So long,

Mega

Share this post


Link to post
Share on other sites
Quirrell

I Appear to have replied using the previous answer, sorry.

Anyway thanks for the help this was just what I needed, Cheers

Share this post


Link to post
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
Sign in to follow this  

×