wdl
12th April 2006 14:28 UTC
I'm lost, need to detect flash 6 or higher and install
I need to detect if Flash 6 or higher is on the system, and if not found install the flash player. Most important, I need to check if the flash player is installed for internet explorer. I don't care if its installed for any other browser, my application uses IE.
But... i'm completely lost (never worked with NSIS before). All examples I find only do a part of what I need, or don't work at all. Could someone please help me out on this one?
Red Wine
12th April 2006 14:54 UTC
look in '$SYSDIR\MACROMED\FLASH' first if exists and if so, then compare version.
Afrow UK
12th April 2006 15:04 UTC
You can use this in VBScript:
checkForFlash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))
checkForFlash6 will be true or false.
Not sure how one would pass it from the VBScript to NSIS though.
On a side note, you could try searching your local registry for a registry entry that identifies which Flash version you have installed.
-Stu
Red Wine
12th April 2006 15:24 UTC
also in $SYSDIR is the easiest way:
!define FLASH 'flash.ocx'
!define CUR_VER '8.0'
outfile grabflash.exe
showinstdetails show
section
SearchPath '$0' '${FLASH}'
strcmp $0 '' _install
messagebox mb_ok 'Flash is here $0'
GetDllVersion '$0' '$R0' '$R1'
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
StrCpy $1 "$R2.$R3"
messagebox mb_ok 'computer version is $1'
intcmp '${CUR_VER}' '$1' +1 +1 _install
messagebox mb_ok 'current version ${CUR_VER} comp version $1 no install need'
goto +3
_install:
messagebox mb_ok 'current version ${CUR_VER} comp version $1 INSTALL need'
sectionend
any
12th April 2006 15:31 UTC
also to be found in the wiki:
http://nsis.sourceforge.net/Get_Macr..._Flash_version
Yurik
3rd May 2006 13:58 UTC
Is it safe to rely on particular file version? Maybe macromedia flash stores anything in registry?