Kyan

Flash Player check for updates / versions

9 posts in this topic

#1 ·  Posted (edited)

Hi, made this, may come handy to someone ^^

#Code with comments

#NoTrayIcon
Global $b = "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player", $url[3] = [$b & "_ax.exe", $b & ".exe", $b & "_ppapi.exe"]
HttpSetUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36") ;Just trying to fit in
Global $expectSameTableOrder = 0 ;WebSite table order may change, so use this as time concious setting
$cur = _CurVer() ;Grabs the lastest versions available from adobe's website
$ver = _GetFlashVersions() ;Grabs installed versions from the registry

;compare the versions
For $x = 0 To 2 ;UBound($ver)-1
    Local $idx = 0, $_match = 0
    If $expectSameTableOrder Then
        $_match = 1
        $idx = $x + 1
    Else
        Do
            $_match = StringInStr($cur[$idx][1], $ver[$x][1])
            $idx += 1
        Until ($idx > (UBound($cur) - 1)) Or ($_match > 0)
    EndIf
        If $ver[$x][0] = "" Then $_match=0
    If $_match > 0 Then
        If _VersionCompare($cur[$idx - 1][0], $ver[$x][0]) = 1 Then
            ;// outdated download url is $url[$x]
            ConsoleWrite("[Lastest:" & $cur[$x][0] & "|Installed:" & $ver[$x][0] & "]" & @TAB & $cur[$x][1] & " its outdated!" & @LF)
        EndIf
    EndIf
Next
Exit


Func _CurVer() ;[0]ActiveX (IE) [1]NPAPI (firefox) [2]PPAPI (chrome/opera)
    Local $__page = BinaryToString(InetRead("https://www.adobe.com/software/flash/about/", 3), 4)
    Local $__rex = StringRegExp($__page, '(?s)(?:<td[^>]*>(.*?)(?:\\|</td>))', 3)
    ;_ArrayDisplay($__rex)
    Local $__ret[1][2], $_skip = 0
    If @OSBuild >= 9200 Then $_skip = 1
    For $x = 1 To 8 Step 2
        If Not (($x = 1 And $_skip) Or ($x = 3 And Not $_skip)) Then
            $p = UBound($__ret)
            If $x < 6 Then ReDim $__ret[$p + 1][2]
            $__ret[$p - 1][1] = $__rex[$x]
            $__ret[$p - 1][0] = $__rex[$x + 1]
        EndIf
    Next
    Return $__ret
EndFunc   ;==>_CurVer

Func _GetFlashVersions()
    Local $__fpver[3][2] = [['', "ActiveX"], ['', "PPAPI"], ['', "NPAPI"]]
    $__fpver[0][0] = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerActiveX", "Version") ;IE
    $__fpver[1][0] = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerPlugin", "Version") ;Firefox
    $__fpver[2][0] = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerPepper", "Version") ;Chrome/opera
    Return $__fpver
EndFunc   ;==>_GetFlashVersions

Func _VersionCompare($sVersion1, $sVersion2)
    If $sVersion1 = $sVersion2 Then Return 0
    Local $aVersion1 = StringSplit($sVersion1, ".,"), _
            $aVersion2 = StringSplit($sVersion2, ".,")
    If UBound($aVersion1) <> UBound($aVersion2) Or UBound($aVersion1) = 0 Then
        ; Compare as Strings
        If $sVersion1 > $sVersion2 Then
            Return SetExtended(1, 1) ; @extended set to 1 for string comparison.
        ElseIf $sVersion1 < $sVersion2 Then
            Return SetExtended(1, -1) ; @extended set to 1 for string comparison.
        EndIf
    Else
        For $i = 1 To UBound($aVersion1) - 1
            ; Compare this segment as numbers
            If StringIsDigit($aVersion1[$i]) And StringIsDigit($aVersion2[$i]) And _
                    StringLen($aVersion1[$i]) = StringLen($aVersion2[$i]) Then ; <<<<<<<<<<<<<<<<<<<<<<
                If Number($aVersion1[$i]) > Number($aVersion2[$i]) Then
                    Return SetExtended(2, 1) ; @extended set to 2 for number comparison.
                ElseIf Number($aVersion1[$i]) < Number($aVersion2[$i]) Then
                    Return SetExtended(2, -1) ; @extended set to 2 for number comparison.
                EndIf
            Else ; Compare the segment as strings
                If $aVersion1[$i] > $aVersion2[$i] Then
                    Return SetExtended(1, 1) ; @extended set to 1 for string comparison.
                ElseIf $aVersion1[$i] < $aVersion2[$i] Then
                    Return SetExtended(1, -1) ; @extended set to 1 for string comparison.
                EndIf
            EndIf
        Next
    EndIf
    ; This point should never be reached
    Return SetError(2, 0, 0)
EndFunc   ;==>_VersionCompare

Thanks to @jguinch for helping me with the regex

EDIT1: Code updated, now skips inexistent installations, added $expectSameTableOrder for timewise routines, _VersionCompare fixed (didn't add "= 1" in the if statement,now seems to be working fine 

For someone looking for a GUI http://pxc-coding.com/portfolio/alternative-flash-player-auto-updater/ [Not mine]

Edited by Kyan
1 person likes this

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Share this post


Link to post
Share on other sites

Great idea! Unfortunately it crashes here. Windows 7 SP1 64 bit, German.

>Running:(3.3.12.0):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Temp\Test.au3"    
--> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop
"C:\Temp\Test.au3" (33) : ==> Subscript used on non-accessible variable.:
$__ret[$p - 1][1] = $__rex[$x]
$__ret[$p - 1][1] = $__rex^ ERROR
->11:47:08 AutoIt3.exe ended.rc:1
+>11:47:08 AutoIt3Wrapper Finished.
>Exit code: 1    Time: 8.268

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

No error my end, though I do wonder if that is a bugfix version of _VersionCompare()?


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Seems to be a problem with HTTPS. INetRead sets @error to 13.

But it works when I use HTTP.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Another question.

I have IE and FF installed on my machine.

The array returned by _GetFlashversions returns this:

Row|Col 0|Col 1
[0]|16.0.0.287|ActiveX
[1]||PPAPI
[2]|16.0.0.287|NPAPI

I only get

"Firefox, Mozilla - NPAPI its outdated!"

Shouldn't I get a "outdated" message for IE as well?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

No error my end, though I do wonder if that is a bugfix version of _VersionCompare()?

uh, not sure, I took it from the UDF present on autoit 3.3.10.2 since it worked I didn't give it much attention :)

Seems to be a problem with HTTPS. INetRead sets @error to 13.

But it works when I use HTTP.

maybe you have a antivirus certificate installed for port 443 analyses, try replace the inetred option with a 3 (in stead of a 1)

InetRead #options:
$INET_FORCERELOAD (1) = Forces a reload from the remote site.
$INET_IGNORESSL (2) = Ignore all SSL errors (with HTTPS connections).

Another question.

I have IE and FF installed on my machine.

The array returned by _GetFlashversions returns this:

Row|Col 0|Col 1
[0]|16.0.0.287|ActiveX
[1]||PPAPI
[2]|16.0.0.287|NPAPI

I only get

"Firefox, Mozilla - NPAPI its outdated!"

Shouldn't I get a "outdated" message for IE as well?

No, you shouldn't got any output since both are updated, latest FlashPlayer version is: 16.0.0.287,

Need to find where I mess up  :sweating: 


Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Share this post


Link to post
Share on other sites

I would advise just to use the include i.e. #include <Misc.au3>, as you might be shipping a buggy version with your application.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

I just added the function to make it lightweight, thanks for the advice guinness :)


Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

This one is mine, made with AutoIT; about 750 lines of code. Have not decided if I want to release the code on this project.

It been around for some time and just got more mature as time went on. Fairly solid. Works on 64 bit systems only, and supports windows 10. Creates Widows logs as well when completed. Mean to preform a clean install of flash player, with some additional options if needed.

Enjoy

 

edit:

I decided to include an uninstall and re-install portion of my script of the latest version of flash from Adobe's site snip it. It is Windows 10 friendly. Its a basic uninstall/reinstall - not a clean install.

Also the registry location below for Windows 10 is not accurate:

HKEY_LOCAL_MACHINE\SOFTWARE\Macromedia\FlashPlayerActiveX

That location does exist but does not display the correct installed Flash version. Apparently this has been a blunder since the initial release of 10.

I include an alternate method of getting the versions of flash player as well in the snip it. That piece is in there for information purposes and not currently active in the script unless you decide to make it so.

Enjoy

Best Regards

#RequireAdmin
#include <InetConstants.au3>
#include <File.au3>
Global $x
Dim $x[6][2]
Global $AXfilename = "install_flash_player_ax.exe"
Global $PLfilename = "install_flash_player.exe"
Global $PPfilename = "install_flash_player_ppapi.exe"
SplashTextOn("Progress", "", 210, 55, -1, -1, 16, "Tahoma", 10)
Call('remoldfiles')
Call('killpro')
Call('uninstall')
Call('NPAPI')
Call('PPAPI')
If @OSVersion = "WIN_7" Or @OSVersion = "WIN_VISTA" Then
    Call(AX)
EndIf
Sleep(200)
Call('remoldfiles')
SplashOff()
Exit

Func remoldfiles()
    FileDelete(@TempDir & "\" & $PLfilename)
    FileDelete(@TempDir & "\" & $PPfilename)
    FileDelete(@TempDir & "\" & $AXfilename)
    FileDelete(@TempDir & "\uninstall_flash_player.exe")
EndFunc   ;==>remoldfiles

Func killpro()
    ControlSetText("Progress", "", "Static1", "Killing Processess", 2)
    $w = ProcessList()
    For $i = 1 To UBound($w) - 1
        If StringRegExp($w[$i][0], "(?i).*" & "flashp" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "firef" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "iexplore" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "opera" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "plugin-container" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "Battle.net" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "steam" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "TWC" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "palemoon" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "iexplorer" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "skype" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "yahoo" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "acro" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
        If StringRegExp($w[$i][0], "(?i).*" & "waterf" & ".*") Then
            $CMD1 = "taskkill.exe /im " & $w[$i][0] & " /t /f"
            RunWait('"' & @ComSpec & '" /c ' & $CMD1, @SystemDir, @SW_HIDE)
        EndIf
    Next
EndFunc   ;==>killpro


Func uninstall()
    $dul = "http://download.macromedia.com/get/flashplayer/current/support/uninstall_flash_player.exe"
    $hDownload2 = InetGet($dul, @TempDir & "\uninstall_flash_player.exe", $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
    ControlSetText("Progress", "", "Static1", "Fetching Adobe Flash Uninstaller", 2)
    Do
        Sleep(200)
    Until InetGetInfo($hDownload2, $INET_DOWNLOADCOMPLETE)
    ControlSetText("Progress", "", "Static1", "Uninstalling Adobe Flash player(s)", 2)
    ShellExecuteWait("uninstall_flash_player.exe", " -uninstall", @TempDir)
EndFunc   ;==>uninstall

Func NPAPI()
    $dip = "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player.exe"
    $hDownload = InetGet($dip, @TempDir & "\" & $PLfilename, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
    ControlSetText("Progress", "", "Static1", "Fetching NPAPI Adobe Flash Player", 2)
    Do
        Sleep(200)
    Until InetGetInfo($hDownload, $INET_DOWNLOADCOMPLETE)
    ControlSetText("Progress", "", "Static1", "Installing Adobe Flash Player NPAPI", 2)
    ShellExecuteWait($PLfilename, " /install", @TempDir)
EndFunc   ;==>NPAPI

;PPAPI Flash Player install
Func PPAPI()
    $did = "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_ppapi.exe"
    $hDownload4 = InetGet($did, @TempDir & "\" & $PPfilename, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
    ControlSetText("Progress", "", "Static1", "Fetching PPAPI Adobe Flash Player", 2)
    Do
        Sleep(200)
    Until InetGetInfo($hDownload4, $INET_DOWNLOADCOMPLETE)
    ControlSetText("Progress", "", "Static1", "Installing Adobe Flash Player PPAPI", 2)
    ShellExecuteWait($PPfilename, " /install", @TempDir)
EndFunc   ;==>PPAPI

; ActiveX Flash Player install
Func AX()

    $dia = "http://fpdownload.macromedia.com/pub/flashplayer/latest/help/install_flash_player_ax.exe"
    ControlSetText("Progress", "", "Static1", "Fetching Adobe Flash ActiveX", 2)
    $hDownload1 = InetGet($dia, @TempDir & "\" & $AXfilename, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND)
    Do
        Sleep(200)
    Until InetGetInfo($hDownload1, $INET_DOWNLOADCOMPLETE)

    ControlSetText("Progress", "", "Static1", "Installing Adobe Flash Player ActiveX", 2)
    ShellExecuteWait($AXfilename, " /install", @TempDir)

EndFunc   ;==>AX

; note this is not active in this script, but an example of how I determine the flash player version. You will have to make the necessary adjustments

Func Versions()
    $aArray = _FileListToArrayRec("C:\Windows\System32\Macromed\Flash\", "*.ocx;*.exe", $FLTAR_FILES)

    For $i = 1 To UBound($aArray) - 1
        If StringInStr($aArray[$i], ".ocx") > 1 Then
            $y = FileGetVersion("C:\Windows\System32\Macromed\Flash\" & $aArray[$i], $FV_PRODUCTVERSION)
            $y = StringReplace($y, ',', ".")
            $x[0][0] = "32 bit Active X"
            $x[0][1] = $y
        ElseIf StringInStr($aArray[$i], "pep") >= 1 Then
            $y = FileGetVersion("C:\Windows\System32\Macromed\Flash\" & $aArray[$i], "ProductVersion")
            $y = StringReplace($y, ',', ".")
            $x[1][0] = "32 bit Pepper Flash"
            $x[1][1] = $y
        ElseIf StringInStr($aArray[$i], "Plugin") >= 1 Then
            $y = FileGetVersion("C:\Windows\System32\Macromed\Flash\" & $aArray[$i], "ProductVersion")
            $y = StringReplace($y, ',', ".")
            $x[2][0] = "32 bit Firefox Flash"
            $x[2][1] = $y
        EndIf
    Next

    $aArray = _FileListToArrayRec("C:\Windows\SysWOW64\Macromed\Flash\", "*.ocx;*.exe", $FLTAR_FILES)

    For $i = 1 To UBound($aArray) - 1
        If StringInStr($aArray[$i], ".ocx") > 1 Then
            $y = FileGetVersion("C:\Windows\SysWOW64\Macromed\Flash\" & $aArray[$i], $FV_PRODUCTVERSION)
            $y = StringReplace($y, ',', ".")
            $x[3][0] = "64 bit Active X"
            $x[3][1] = $y
        ElseIf StringInStr($aArray[$i], "pep") >= 1 Then
            $y = FileGetVersion("C:\Windows\SysWOW64\Macromed\Flash\" & $aArray[$i], "ProductVersion")
            $y = StringReplace($y, ',', ".")
            $x[4][0] = "64 bit Pepper Flash"
            $x[4][1] = $y
        ElseIf StringInStr($aArray[$i], "Plugin") >= 1 Then
            $y = FileGetVersion("C:\Windows\SysWOW64\Macromed\Flash\" & $aArray[$i], "ProductVersion")
            $y = StringReplace($y, ',', ".")
            $x[5][0] = "64 bit Firefox Flash"
            $x[5][1] = $y
        EndIf
    Next
EndFunc   ;==>Versions

 

Edited by Carm01
adding info

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • nacerbaaziz
      By nacerbaaziz
      Detect if the focus item is a button or check box
      Hello everyone.
      My dears I have a problem
      When I try to use
      ControlGetFocus function
      it  doesn't recognize the check  boxes.
      The result is that the selector is a button
      Although the specified is a check box
      but I want a way to identify the check boxes.
      Because I want to make a tool that helps screen readers users
      I hope you have the solution.
      Thank you in advance.
       
    • nacerbaaziz
      By nacerbaaziz
      hellow guys
      I am a blind young man
      I started a project to make an audio player
      with recorder
      I ended the player and i did not know how to recorder
      This player is Compatible with the blind and visually impaired and ordinary users
      Unfortunately I do not see so I could not merge images and icons
      So I hope you will be able to help me in this matter
      I will bring you the open source project and please help me to add images, icons and recorder, the project is requires easy access in order to be compatible with the screen readers, Please take this into account.
      the software is organized so the recorder is In a special  menu that Contains stop and start and pause and save.
      The same is true for player
      Please help
      And greetings to all
      easy player.zip
    • Simpel
      By Simpel
      Hi, I created a gui with date field but formatted as time in HH:mm. It always shows "now-time". Even if I try to set it with GUICtrlSetData.
      #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> Example() Func Example() GUICreate("My GUI get date", 200, 200, 800, 200) Local $idDate = GUICtrlCreateDate("", 20, 20, 100, 20, $DTS_TIMEFORMAT) ; to select a specific default format Local $sStyle = "HH:mm" ; Just display hours and minutes <<<<<<<<<<<<<<<<<<<<<<<<<<<< GUICtrlSendMsg($idDate, $DTM_SETFORMATW, 0, $sStyle) ConsoleWrite(GUICtrlRead($idDate) & @CRLF) GUICtrlSetData($idDate, "00:00") ConsoleWrite(GUICtrlRead($idDate) & @CRLF) GUISetState(@SW_SHOW) ; Loop until the user exits. While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd MsgBox($MB_SYSTEMMODAL, "Time", GUICtrlRead($idDate)) EndFunc ;==>Example How can I set the time field with another time and how can this field be set blank?
      Regards, Conrad
    • TheDcoder
      By TheDcoder
      Hi, I have a 2D array with 2 columns, the 1st column contains a "version string" and the 2nd column contains a generic string. I want to sort it in the descending order so the latest version comes first.
      #include <Array.au3> Local $aVersionsAndReleases[4][2] = [["0.2.8.9", "Release #1"], ["0.2.9.10", "Release #3"], ["0.2.9.11", "Release #4"], ["0.2.8.10", "Release #2"]] _ArraySort($aVersionsAndReleases, 1) ConsoleWrite(_ArrayToString($aVersionsAndReleases, ' - ')) _ArrayDisplay($aVersionsAndReleases) Unfortunately, _ArraySort isn't working here . This is the output generated by the script:
      0.2.9.11 - Release #4 0.2.9.10 - Release #3 0.2.8.9 - Release #1 0.2.8.10 - Release #2 The expected result should be:
      0.2.9.11 - Release #4 0.2.9.10 - Release #3 0.2.8.10 - Release #2 0.2.8.9 - Release #1 I am looking to develop an function which does this... but I don't know where to start . Can someone help me get started? Thanks in Advance!
      - TD.
    • ur
      By ur
      In the present product I have version in the About section as  4 section one like (10.00.00.2456)
      And the version in other products I have version number like (97.000.2456 , 10.000.2345)
       
      Is there any UDF or function to convert 4 digit format to 3 digit one.?
      I need that for version comparison of different products.