Archive: detection of acrobat reader 7. or higher


detection of acrobat reader 7. or higher
hello
i make a javascript which only work with acrobat reader 7 or higher (8, 9 and future).
my nsis copy this javascript only if is acrobat reader 7 8 and 9 as detected. If it's a lower version (6,5 or 4) i put an message box to install a new version.
My problem is if adobe create a new version of reader, i need put a new line on my nsis:


AcrobatRdr8:
ReadRegStr $R2 HKLM "Software\Adobe\Acrobat Reader\8.0\Installpath" ""
StrCpy $R3 "acrord32.exe"
StrCmp $R2 "" 0 notfirst
goto AcrobatRdr9

AcrobatRdr9:
ReadRegStr $R2 HKLM "Software\Adobe\Acrobat Reader\9.0\Installpath" ""
StrCpy $R3 "acrord32.exe"
StrCmp $R2 "" 0 notfirst
goto AcrobatPro9

i test if all version are present.
Now i want only want to have a code who test if adobe version are higher than 6.
I know how detect number with
EnumRegKey $0 "HKLM" "SOFTWARE\Adobe\Acrobat Reader" "0" 

but i don't know what's the code to say if $0 > 6 install
if not messagebox "install a higher version"
thanks for your help and for my english.

this should work for you i tested it a few times by changing the registry entries for acrobat from my 8.0 to 6.0 ect ect


Function CheckAcrobat
EnumRegKey $0 "HKLM" "SOFTWARE\Adobe\Acrobat Reader" "0"
IfErrors 0 YesAcrobat

;--If acrobat NOT found tell them
MessageBox MB_YESNO "Adobe Acrobat is not installed you need it for this javascript!" IDYES
Goto Exit


;--If acrobat is found check if version 7 or higher
YesAcrobat:
;--you dont really need the msg box right below I just put that there to tell the version
MessageBox MB_YESNO "acroat Is installed version $0" IDYES

${if} $0 <= 6.0
MessageBox MB_OK "you need to upgrade Acrobat Reader to 7.0 or higher to run this javascript"

${EndIf}



Exit:
FunctionEnd


Section
Call CheckAcrobat

SectionEnd


theres also a nsi script attached

it's work fine but i have a problem with acrobat reader 5 because this application is not updated by the installation of arcrobat 6, 7 or 8.
the two acrobat can been installed in same time on the computer.