GetDllVersion Command Explained: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Wikipedia python library) |
m (Updated author and download links, and changed format of some pages.) |
||
Line 15: | Line 15: | ||
</highlight-nsis> | </highlight-nsis> | ||
Page author: sunjammer | Page author: [[User:sunjammer|sunjammer]] |
Revision as of 12:15, 23 April 2005
Description
GetDllVersion is a tricky command to get used to. It's one of the built-in commands in NSIS, I'm not sure what version it was introduced in (email me if you know). There is a download link at the bottom to a text file containing this example. v-tal's explanation went like this :-
About numbers GetDllVersion. First 16 bit of first number is major version. Second 16 bit of first number is minor version. First 16 bit of second number is release version. Second 16 bit of second number is build version.
Example
So, try something like this:
GetDLLVersion "MyApp.exe" $R0 $R1 IntOp $R2 $R0 / 0x00010000 ; $R2 now contains major version IntOp $R3 $R0 & 0x0000FFFF ; $R3 now contains minor version IntOp $R4 $R1 / 0x00010000 ; $R4 now contains release IntOp $R5 $R1 & 0x0000FFFF ; $R5 now contains build StrCpy $0 "$R2.$R3.$R4.$R5" ; $0 now contains string like "1.2.0.192"
Page author: sunjammer