Jump to content
Kyan

Flash Player check for updates / versions

Recommended Posts

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

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 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

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()?


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_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: 22/04/2018

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 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

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 2019-08-19 - Version 1.4.13.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2019-07-24 - Version 1.3.6.0) - Download - General Help & Support - Example Scripts - Wiki
Outlook Tools (NEW 2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
Taks Scheduler (NEW 2019-10-09 - Version 0.9.0.0) - Download - General Help & Support - Wiki

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.


UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_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: 22/04/2018

Share this post


Link to post
Share on other sites

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

    • By CYCho
      This file includes all the source codes and a compiled .exe version of zPlayer, which is a stand-alone, simple, intuitive and easy-to-use, yet fully functional audio player.  I made this to suit my purpose and you can tweak it to your taste as the source code is only about 1000 lines which are very much readable.  This player has the following functions:
      - Play back all formats of audio files which can be palyed back by the Windows Media Player in your computer
      - Graphical player similar to embedded Windows Media Player
      - Forward, backward, pause, repeat, shuffle funtions
      - Increase/decrease/mute sound volume
      - Change folders and create playlist for all audio files in that folder and its subfolders, and support for manually-made playlists
      - Save play-back environment when terminating and resume that environment when restarting
      - With one click, you can see DuckDuckGo search results for the file being played back
      - With a double-click, you can play back an item in the playlist
      - Search strings in the playlist
      - Option to see long file names including folder names
      - Resize the playlist window, and restore it to its default position
      - Very small footprint: very low CPU and memory usage, with only about 1MB when compiled
      - You can even hide all the windows and manipulate the player with hotkeys only
    • By CYCho
      zPlayer is the name I used when I introduced the early version of this palyer in my blog back in early 2009 and, therefore, has nothing to do with the mobile media player of the same name which started marketing in 2015.
      After I retired from active duty in 2002 I spent much time listening to music. First I started with CD's and LP's, then quickly moved on to mp3 files. I converted many of my CD's to mp3 and I collected many more from various sources which were freely available at the time. As the number of my mp3 files grew, I put them in folders according to their genres and my favorite classifications. I mainly used Windows Media Player to listen to them and I slowly began to dislike wmp because it had massive user interface while I just wanted to listen to music in the background while I was doing other work in the foreground, hopping between folders from time to time. It was the time I was beginning to learn AutoIt and I thought I should make my own player with AutoIt. Coming from a sales career with no experience in programming, it was not an easy task. Somehow, after about 2 years of learning and trying, I had my own audio player which worked with only hotkeys without any graphical interface. I gave it to some of my friends who were not as computer-savvy as I. They liked it but definitely wanted something to clcik with mouse. So I came up with very rude gui which took a form similar to what it is now.
      The attached source files include one au3 file, one icon file and 14 jpg files. The jpg files are used for drawing a graphical player and are fileinstalled in @DocumentsCommonDir folder. This player uses WMPlayer.OCX as its engine and supports all audio file formats supported by wmp and additional codecs installed. I would like to thank @Bilgus for kind answers to my questions and would appreciate it if anyone could review the code and give me any suggestion. This player works for me, but I don't know whether the code is presentable as an example. I am posting this here with a hope to learn much from AutoIt community.
      PS: 1. An error (Variable used before declaration) was reported and corrected - 02:00 hours GMT,  March 14, 2019
            2. An error in tray menu was corrected -10:00 hours GMT, March14, 2019
            3. AutoIt3Wrapper_Au3Check_Parameters definition was added at the top of the code and all ensuing errors were corrected. - 00:10 hours GMT, March 16 2019
            4. Some features were added. - 10:30 hours GMT, March 18, 2019
                a. Jumping to new play-back position in a file
                b. Support for a manually made playlist
                c. Ctrl+Alt+h hotkey to trigger a help message box
            5. The minimum resizing width of playlist window was set at 450. - 01:10 hours GMT, March 23, 2019
            6. Problems associated with actions taken while in 'paused' status was addressed. - 07:40 GMT, April 12, 2019
            7. An error was found and corrected in restoring previous play-back environment when the mode was 'Shuffled.' - 11:00 GMT, April 17, 2019


      Please see Downloads section of this forum for source code files.
       
    • By SgtIgram
      Hi!
      First.. sorry for my bad english
      For some time i play a bit with embedded Flash-Objects and after a few changed variables in the "root" of the flash-file with
      $oRP.SetVariable("/:randomVar", "foobar") i came to the problem that i need to change a variable thats inside a function/class or whatever
      the wanted variable is inside a
      _global.client = new clientCom(fooBar); and is defined as
      var _loc1_ = this; _loc1_.randomVariable = ""; how can i change it?
      i tried something like
      $oRP.SetVariable("/:client.randomVariable", "foobar") but nothing =(
       
      i hope someone can help me!
       
      greetings
      - sgtigram
    • 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.
       
    • 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
×
×
  • Create New...