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
      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.
    • wakillon
      By wakillon
      I love chiptune music, but BASS only support XM, IT, S3M, MOD, MTM, UMX and MO3 file format for MOD music.
       
      1 | Nintendo NES and SNES Sound File Players
      May be you already have some files with extension nsf, nsfe, spc or rsn (unzip rsn files for get spc collection files inside) but you can't play them in a AutoIt script ?
      So I searched around a bit, and found 2 DLL ( nsf_player.dll and spc_player.dll ) for play Nintendo NES and SNES Sound Files.
      Interest of those DLL is that they can play from file path or binary data, avoiding temp files.
      Dll and audio files are embedded in scripts for permit you to test them right away.
      Some info/download links are in front of each script.
       
      2 | ModPlug Player
      Another dll found : npmod32.dll who support mod, s3m, xm, med, it, s3z, mdz, itz, xmz and wav files.
      Interest : it can play some rares chiptune formats, you can also pause, set volume and set position.
      Inconvenient : do not load from binary datas.
      Dll and audio files are embedded in script and i have added a gui for permit you to try right away !
      Warning : Do not work on Win8.
       
      3 | ZXTune Player 2 (basszxtune.dll v2.4.5) UPDATE of 23 DEC 2016
      Using BASSZXTUNE chiptune support for BASS ( Support  as0, asc, ay, ftc, gtr, psc, psg, psm, pt1, pt2, pt3, sqt, st1, s, st3, stc, stp, ts, txt, vtx, ym, chi, dmm, dst, m, sqd, str, sid, cop, tf0, tfc, tfd, tfe, $b, $m, ahx, ayc, bin, cc3, d, dsq, esv, fdi, gam, gamplus, gbs, gym, hes, hrm, hrp, lzs, msp, mtc, nsf, nsfe, p, pcd, sap, scl, spc, szx, td0, tlz, tlzp, trd, trs, vgm )
      Interest : it can play lot of rares chiptune formats, while benefiting from all bass functions.
      Inconvenient : dll size.(5860ko)
      Dll and audio files are embedded in script.
       
      4 | TitchySID Player 
      Files and dll are loaded in memory.
      Interest : dll size (8ko), you can Play/Stop/Pause/Resume and choose which subsong to play.
      Inconvenient : only SID audio files supported ( PSID & RSID)
      Dll and audio files are embedded in script.
      Tested under Win7 and Win8.
      Edit : added a Sid header viewer : SidHeaderViewer.au3
       
      5 | MiniFmod Player
      Interest : dll size (20ko)
      Inconvenient : only xm audio files supported.
       
      6 | Npnez Player 
      Using npnez.dll (88ko) for play Gameboy Sound System audio files and some others ( kss, hes, nsf, ay, gbr, gbs, gb, nsd, sgc )
      Interest : Can be loaded in memory, subsong can be set and volume can be adjusted ( perfect for create a fade when exiting ) 
      Inconvenient : for an unknow reason, only 20% of my hes collection is playable...
       
      7 | µFMOD Player 
      Interest : dll size (10ko), can be loaded in memory, support Play/Stop/Pause/Resume actions and volume can be adjusted ( perfect for create a fade when exiting ) 
      Inconvenient : only xm audio files supported.
       
      8 | MagicV2m Player 
      Interest : dll size (20ko), Play/Stop/IsPlay/SetAutoRepeat/Progress
      Inconvenient : only v2m audio files supported, V2mPlayStream is not reliable, so prefer V2mPlayFile instead.
       
      9 | OSMEngine Player 
      OSMEngine.dll (80 ko)(Oldskool Musics Engine) permit to play snd, sndh, fc, fc4, fc14 and some rare jam audio files from Amiga/Atari ST(E)
      Interest : audio can be loaded in memory, and Pause/Resume/SetVolume/GetInfos are available
      Inconvenient : none at the moment. 
       
      10 | Ayfly Player
      Ayfly.dll (268 ko) is a AY-891x emulator and player who support
      the following tracker formats : aqt, asc, ay, fxm, gtr, psc, psg, pt1, pt2, pt3, sqt, stc, stp, vtx, ym and zxs (ZX Spectrum Emulator Snapshot) files.
      Interest : SetVolume/GetInfos are available
      Inconvenient : a function named "ay_initsongindirect" for load module in memory exists, but due to the poor documentation provided i do not succeed to get it to work...
       
      11 | GMGME Player
      GMGME.dll is a emulated music DLL that allows you to play ay, gbs, gym, hes, kss, nsf/nsfe, sap, spc and vgm files.
      Interest : Can play ATARI SAP files (only type B and C) , Set Volume and Set Tempo are available
      Inconvenient : Dll Size (and his imports) , and audio files can not be loaded in memory.
       
      12 | SC68 Player
      sc68replay.dll (166 ko) is a Freebasic DLL compiled from "sc68replay" src that allows you to play SC68  (Atari ST and Amiga audio formats)  files.
      Interest : Can play from file and memory
      Inconvenient : Unfortunatelly for an unknown reason not all sc68 files are supported.
       
      13 | Extended Module Player
      LibXmp.dll  (272 ko)  can "read" xm, mod, it, s3m, med, 669 but also some rares formats
      abk, amd, amf, dbm, digi, dtm, emod, far, flx, fnk, gdm, hsc, imf, j2b, liq, m15, mdl, mfp, mgt, mtm, mtn, okt, psm, ptm, rad, rtm, sfx, smp, stim, stm, stx, ult, umx, wow, ym3812
      Despite its name, it's not a "player" but a library that renders module files to RAW PCM data.
      So the interest in this script was to find a way to convert those raw datas into a "playable" sound.
      With Waveform Audio Interface i create a pseudo Wav header who permit to play datas as a Wav file.
      Interest : Can play from file and memory
      Inconvenient : Time to render datas (depends of file size)
       
      14 | LibModPlug Player
      LibModPlug.dll (102 ko)  can "read" xm, it, mod, s3m, med, 669 and also amf, ams, dbm, dmf, dsm, far, j2b, mdl, mt2, mtm, okt, psm, ptm, stm, ult, umx.
      As LibXmp.dll, it's a library that renders module files to RAW PCM data.
      For this one, i create a real binary wave header for be able to play it easily from memory with winmm.dll PlaySoundW function.
      Interests : Can play from file and memory, and have some nice sound effects : Surround, MegaBass and Reverb  (used in script example)
      It can also replace modplug player(2) for Win 8+ users
      Inconvenient : Time to render datas (depends of file size)
       
      15 | AdPlug Player
      AdPlug.dll ( 69ko ) is an AdLib sound player library who is able to play the following files type :  A2M, ADL, AMD, BAM, CFF, CMF, D00, DFM, DMO, DRO, DTM, HSC, HSP, IMF, KSM, LAA, LDS, M, MAD, MID, MKJ, MSC, MTK, RAD, RAW, RIX, ROL, S3M, SA2, SAT, SCI, SNG, XAD, XMS, XSM
      For this one, time to render datas is to long, so i needed to find an other way for play modules.
      Using Bass.dll and particulary the "BASS_StreamPutData" function i succeeded to play module in loop while rendering it.
      Both DLL are loaded in memory, and 16 different module types are available in the script. No includes/files needed. Just run it.
      Warning : for a unique file extension (example .sng), it's sometimes possible to have several filetypes from different trackers !
      AdPlug.dll Imports : msvcp71.dll, msvcr71.dll in C:\Windows\SysWOW64  ( VC Redist Installer )
      Interests : Can read some obscure rare formats.
      Inconvenient : Can not read from memory
       
      16 | LibMikmod Player
      LibMikmod.dll (85ko) will currently play the following common and not so common  formats : 669, AMF, DSM, FAR, GDM, IMF, IT, MED, MOD, MTM, S3M, STM, STX, ULT, UNI, XM  
      Interests : Can load from memory
      Inconvenient : only for full-screen applications, because if the application has not the focus sound is muted
       
       
      Downloads are available in the download section
      Dedicated to chiptune Lovers ! 
      Music Links : 
      asma.atari.org  woolyss.com  chipmusic.org  demozoo.org  modarchive.org  modules.pl  keygenmusic.net  zxtunes.com  mazemod.org  amigaremix.com  pouet.net  plopbox.eu  Modland