Old 27th October 2005, 14:58   #1
pistahun
Junior Member
 
Join Date: Jan 2004
Posts: 7
Send a message via ICQ to pistahun
Get Flash Player version

Hi!

Read example "Macromedia Flash Player installed?". Very good!

Question: flash player version?

Thx answer!
pistahun is offline   Reply With Quote
Old 27th October 2005, 14:57   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Get Flash Player version

http://nsis.sourceforge.net/wiki/Get..._Flash_version

Edit:
What happened here lol
My reply went to the top...

-Stu
Afrow UK is offline   Reply With Quote
Old 27th October 2005, 15:10   #3
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
code:
Name "Output"
OutFile "Output.exe"

!include "WordFunc.nsh"
!insertmacro WordFind

!include "FileFunc.nsh"
!insertmacro GetFileVersion

Section
ReadRegStr $0 HKCR "ShockwaveFlash.ShockwaveFlash\shell\open\command" ""
IfErrors notinst

${WordFind} '$0' '"' '+1' $0

${GetFileVersion} '$0' $1
IfErrors notinst

MessageBox MB_OK '$$0={$0}$\n$$1={$1}' IDOK end

notinst:
MessageBox MB_OK 'Macromedia Flash Player is not found'

end:
SectionEnd

Instructor is offline   Reply With Quote
Old 27th October 2005, 20:25   #4
pistahun
Junior Member
 
Join Date: Jan 2004
Posts: 7
Send a message via ICQ to pistahun
Unfortunetly, the examples don't work right! :-(
Macromedia MX is installed on my system ( with flash 6 integrated ), and after it i installed the Flash Player 8.

After it the values that were given back to the version numbers: 6.0.21.0 and 7.0.19.0.

How will I know the right version number?

Thank you in anticipation!
pistahun is offline   Reply With Quote
Old 28th October 2005, 04:57   #5
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
This code to return Macromedia Flash Player version of the default player for the .spl and .swf. If you run "file.swf" from the explorer you can check it. This code doesn't return version of the default browser flash plugin.
code:
Name "Output"
OutFile "Output.exe"

!include "WordFunc.nsh"
!insertmacro WordFind

!include "FileFunc.nsh"
!insertmacro GetFileVersion

Section
ReadRegStr $0 HKEY_CLASSES_ROOT "ShockwaveFlash.ShockwaveFlash\shell\open\command" ""
IfErrors notinst

${WordFind} '$0' ' %1' '-1{' $0
${WordFind} '$0' '"' '+1' $0

${GetFileVersion} '$0' $1
IfErrors notinst


MessageBox MB_OK '$$0={$0}$\n$$1={$1}' IDOK end

notinst:
MessageBox MB_OK 'Macromedia Flash Player is not installed'

end:
SectionEnd

Instructor is offline   Reply With Quote
Old 28th October 2005, 12:19   #6
pistahun
Junior Member
 
Join Date: Jan 2004
Posts: 7
Send a message via ICQ to pistahun
I'm sorry... :-( Question bad. :-(
Aright question: return version of the default browser flash plugin?
Default browser - only - Internet Explorer.
pistahun is offline   Reply With Quote
Old 28th October 2005, 13:26   #7
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
For Internet Explorer:
code:
Name "Output"
OutFile "Output.exe"

!include "FileFunc.nsh"
!insertmacro GetFileVersion

Section
ReadRegStr $0 HKCR "CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}\InprocServer32" ""
IfErrors notinst

${GetFileVersion} '$0' $1
IfErrors notinst

MessageBox MB_OK '$$0={$0}$\n$$1={$1}' IDOK end

notinst:
MessageBox MB_OK 'Macromedia Flash Player component for IE is not found'

end:
SectionEnd

Instructor is offline   Reply With Quote
Old 28th October 2005, 19:26   #8
pistahun
Junior Member
 
Join Date: Jan 2004
Posts: 7
Send a message via ICQ to pistahun
Thumbs up

Very, very good!
Thx!
pistahun is offline   Reply With Quote
Old 13th June 2006, 15:05   #9
Yurik
Senior Member
 
Join Date: Oct 2004
Posts: 103
Re: Get Flash Player version

Quote:
Originally posted by Afrow UK
http://nsis.sourceforge.net/wiki/Get..._Flash_version

Edit:
What happened here lol
My reply went to the top...

-Stu
This doesn't work for flash version 8 as it installs ocx with another name (flash8.ocx).

Computer Forensics Investigations, Internet Security and Parental Control, - http://belkasoft.com
Yurik is offline   Reply With Quote
Old 13th June 2006, 15:12   #10
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
But it has Push "flash.ocx" for the function call which you can change (or did you add that in just now?)

-Stu
Afrow UK is offline   Reply With Quote
Old 13th June 2006, 15:16   #11
Yurik
Senior Member
 
Join Date: Oct 2004
Posts: 103
So, I need two calls in order to determine flash version - one for flash 8 and (in case of failure) for flash with previous version?

Computer Forensics Investigations, Internet Security and Parental Control, - http://belkasoft.com
Yurik is offline   Reply With Quote
Old 13th June 2006, 15:18   #12
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I guess so yes

-Stu
Afrow UK is offline   Reply With Quote
Old 15th June 2006, 21:37   #13
battleline
Junior Member
 
Join Date: Jun 2006
Posts: 1
Can NSIS be used to download the flash player if it can not find the proper version?
battleline is offline   Reply With Quote
Old 15th June 2006, 22:31   #14
JasonFriday13
Major Dude
 
JasonFriday13's Avatar
 
Join Date: May 2005
Location: New Zealand
Posts: 916
Yes. Use the NSISdl plugin (included with NSIS), or the InetLoad plug-in to download it.

"Only a MouseHelmet will save you from a MouseTrap" -Jason Ross (Me)
NSIS 3 POSIX Ninja
Wiki Profile
JasonFriday13 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast 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