Archive: FileInfo Plugin *NEW*


FileInfo Plugin *NEW*
Hello Forum!

I generated this plugin as a means of obtaing the embedded file information (The Version Tab, on the file's property page). I figured it could be useful to others. So far I have only tested this on Windows XP Prof.

If you have feature requests, comments etc. feel free to use this thread as a stomping ground.


As for the developers,; this has been designed to be extracted into the NSIS\Contrib folder as FileInfo.

Hope it's of use,

ZimSMS


FileInfo Genecric Syntax
-----------------------

FileInfo::<Function> <Filename>

Where:
<Function> is one of the functions in the table below. ie: GetProductName
<Filename> is a valid filename. ie: "C:\Temp\MyFile.txt"


FunctionName Comment
----------------------- --------------------------------------------
GetProductName Get the Property known as "ProductName"
GetProductVersion Get the Property known as "ProductVersion"
GetCompanyName Get the Property known as "CompanyName"
GetFileVersion Get the Property known as "FileVersion"
GetFileDescription Get the Property known as "FileDescription"
GetInternalName Get the Property known as "InternalName"
GetLegalCopyright Get the Property known as "LegalCopyright"
GetLegalTrademarks Get the Property known as "LegalTrademarks"
GetOriginalFilename Get the Property known as "OriginalFilename"
GetSpecialBuild Get the Property known as "SpecialBuild"
GetPrivateBuild Get the Property known as "PrivateBuild"
GetComments Get the Property known as "Comments"


FileInfo Special Syntax
-----------------------

FileInfo::GetUserDefined <Filename> <PropertyName>

Where:
<Filename> is a valid filename. ie: "C:\Temp\MyFile.txt"
<PropertyName> is a valid name of a property you want to obtain a value from. ie:"Language"



Return Values
-----------------------
Just pop it off the stack.


If the property is found it's value will be returned. ie: "My Company"
If the property is not found it will be Null. ie: ""
Otherwise, the value returned will start with "Error:", followed by an error message. ie: "Error:Unable to allocate memory."

Example
-----------------------
See FileInfo.nsi

Source
-----------------------
Freeware, can be used anywhere by anyone, or whatever license Nullsoft has bound their wrapper with,
most of the rest came from the free Online Microsoft Library. Since this is freeware, use at your own risk. See the source for more information.

Built with Visual Studio 2003 (VC7.1)


Nice :D


Thanks! I figured if Microsoft did something other than what they documented the GetUserDefined would be the way to bypass it. I haven't tested it in other languages yet....I hope it works! :D


Nice :D

Good work :up: