Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 17th June 2004, 19:40   #1
zimsms
Senior Member
 
zimsms's Avatar
 
Join Date: Jan 2004
Location: London, Ontario, Canada
Posts: 272
Talking 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)
Attached Files
File Type: zip fileinfo.zip (34.5 KB, 2274 views)
zimsms is offline   Reply With Quote
Old 17th June 2004, 19:45   #2
JamesF1
Junior Member
 
Join Date: Jun 2004
Location: IRC :)
Posts: 6
Send a message via ICQ to JamesF1
Nice
JamesF1 is offline   Reply With Quote
Old 17th June 2004, 19:55   #3
zimsms
Senior Member
 
zimsms's Avatar
 
Join Date: Jan 2004
Location: London, Ontario, Canada
Posts: 272
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!
zimsms is offline   Reply With Quote
Old 18th June 2004, 03:21   #4
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,896
Nice

Good work


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump