Get Macromedia Flash version: Difference between revisions
From NSIS Wiki
Jump to navigationJump to search
m (Added category links.) |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{ | {{PageAuthor|Joel}} | ||
== The Script == | == The Script == | ||
<highlight-nsis> | <highlight-nsis> | ||
Line 38: | Line 36: | ||
</highlight-nsis> | </highlight-nsis> | ||
[[ | == Note == | ||
As of version 9 Adobe seems to have renamed the OCX to "flash9d.ocx". See alternate version of GetFlashVer [[Get_Macromedia_Flash_version_2]] for a different method which may be a little more robust. | |||
[[Category:Other Products Version Detection Functions]] |
Latest revision as of 14:59, 26 July 2007
Author: Joel (talk, contrib) |
The Script
; Let's read the version of Macromedia Flash AvtiveX version OutFile "FlashVer.exe" Name "Detect Macromedia Flash Player version" Caption "Detect Macromedia Flash Player version" XPStyle "on" Function "GetFlashVER" Exch $0 GetDllVersion "$SYSDIR\Macromed\Flash\$0" $R0 $R1 IntOp $R2 $R0 / 0x00010000 IntOp $R3 $R0 & 0x0000FFFF IntOp $R4 $R1 / 0x00010000 IntOp $R5 $R1 & 0x0000FFFF StrCmp $R2 "0" +3 0 StrCpy $1 "$R2.$R3.$R4.$R5" Goto +2 StrCpy $1 "No file version" Exch $1 FunctionEnd Function ".onInit" Push "flash.ocx" Call "GetFlashVER" Pop $1 MessageBox MB_OK|MB_ICONINFORMATION "File: $0 $\r$\nVersion: $1" Quit FunctionEnd Section "-boo" ; SectionEnd
Note
As of version 9 Adobe seems to have renamed the OCX to "flash9d.ocx". See alternate version of GetFlashVer Get_Macromedia_Flash_version_2 for a different method which may be a little more robust.