Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 3rd September 2008, 22:09   #1
moxo
Junior Member
 
Join Date: Jul 2003
Location: france
Posts: 33
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:
code:

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
code:
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.
moxo is offline   Reply With Quote
Old 3rd September 2008, 23:01   #2
ZmAn3
Senior Member
 
Join Date: Oct 2003
Posts: 165
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

code:

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
Attached Files
File Type: nsi acrotest.nsi (2.1 KB, 157 views)
ZmAn3 is offline   Reply With Quote
Old 19th September 2008, 12:16   #3
moxo
Junior Member
 
Join Date: Jul 2003
Location: france
Posts: 33
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.
moxo is offline   Reply With Quote
Reply
Go Back   Winamp 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