Is Macromedia Flash Player installed: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Updated author and download links, and changed format of some pages.)
m (Updated author links.)
Line 1: Line 1:
{|align=right
|<small>Author: [[{{ns:2}}:sunjammer|sunjammer]] ([[{{ns:3}}:sunjammer|talk]], [[{{ns:-1}}:Contributions/sunjammer|contrib]])</small>
|}
<br style="clear:both;">
== Description ==
== Description ==
This function detects if Macromedia Flash is installed in the user's computer.
This function detects if Macromedia Flash is installed in the user's computer.
Line 28: Line 32:
   Exch $R0
   Exch $R0
  FunctionEnd</highlight-nsis>
  FunctionEnd</highlight-nsis>
Page author: [[User:sunjammer|sunjammer]]

Revision as of 02:59, 30 April 2005

Author: sunjammer (talk, contrib)


Description

This function detects if Macromedia Flash is installed in the user's computer.

The Function

 ; IsFlashInstalled
 ;
 ; By Yazno, http://yazno.tripod.com/powerpimpit/
 ; Returns on top of stack
 ; 0 (Flash is not installed)
 ; or
 ; 1 (Flash is installed)
 ;
 ; Usage:
 ;   Call IsFlashInstalled
 ;   Pop $R0
 ;   ; $R0 at this point is "1" or "0"
 
 Function IsFlashInstalled
  Push $R0
  ClearErrors
  ReadRegStr $R0 HKCR "CLSID\{D27CDB6E-AE6D-11cf-96B8-444553540000}" ""
  IfErrors lbl_na
    StrCpy $R0 1
  Goto lbl_end
  lbl_na:
    StrCpy $R0 0
  lbl_end:
  Exch $R0
 FunctionEnd