Old 25th January 2011, 07:20   #1
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
Header file for getting file version information

The script is written by Anders originally and collected by me. This is an alternative choice for getting the version informations of an EXE or DLL intead of the MoreInfo plug-in.
Attached Files
File Type: zip GetFileVerInfo.zip (2.8 KB, 140 views)

Contact me: 137729898@qq.com
jiake is offline   Reply With Quote
Old 25th January 2011, 10:46   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
You should make a wiki page for something like this, it just gets lost on the forum.

...also, why did you remove the LogicLib usage? The logic lib overhead is a single global variable that you end up declaring anyway if your installer uses MUI etc...
Even if you don't want to use the logiclib, you could use ("dynamic") labels, direct jumps are hard to get right.

Finally, you sort of broke my code, if you check the pastebin code you see that I'm checking GetLastError even if GetFileVersionInfo returns != 0 since a comment on MSDN said that you could crash if you don't do this!

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 25th January 2011, 13:58   #3
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
I think if one of the steps fails, it always must push error to stack, so I use IntCmp to jump to one common label to push error message. Additionally, I will look over the issue you said and update it.

Updated for checking GetLastError:
Attached Files
File Type: zip GetFileVerInfo.zip (2.8 KB, 135 views)

Contact me: 137729898@qq.com
jiake is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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