User Tools

Site Tools


powershell_check_for_updates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
powershell_check_for_updates [2016/02/06 00:55] stephenpowershell_check_for_updates [2017/02/07 21:27] (current) – external edit 127.0.0.1
Line 3: Line 3:
 <code powershell> <code powershell>
 #requires -version 3.0 #requires -version 3.0
- +
 #### Check for updates #### Check for updates
-#### Version 1.29 +#### Version 1.36 
-#### Last updated 2016-02-06+#### Last updated 2017-02-07
 #### The canonical version of this script is at http://tallguyracing.com/wiki/doku.php?id=powershell_check_for_updates #### The canonical version of this script is at http://tallguyracing.com/wiki/doku.php?id=powershell_check_for_updates
 + 
 $appsToCheck = @{ $appsToCheck = @{
-          'Dummy'            = 'Dummy'           +          'Dummy'            = 'Dummy' 
-        ; 'ThisScript'       = '1.28+        ; 'ThisScript'       = '1.31
-        ; 'Anki'             = '2.0.33+        ; 'Anki'             = '2.0.36
-        ; 'ConEmu'           = '160204'+        ; 'ConEmu'           = '160619'
         ; 'Paint.NET'        = '4.0.9'         ; 'Paint.NET'        = '4.0.9'
-        ; 'Rockbox'          = '3.13' +#       ; 'Rockbox'          = '3.13' 
-        ; 'DokuWiki'         = '2015-08-10' +#       ; 'DokuWiki'         = '2013-05-10' 
-        ; 'Notepad++'        = '6.8.8        # Hopefully, this can be reverted to a fully automatic check in the future. +        ; 'Notepad++'        = '6.9.2        # Hopefully, this can be reverted to a fully automatic check in the future. 
-      ; 'Notepad++'        = 'Notepad++\notepad++.exe+       ; 'Notepad++'        = 'Notepad++\notepad++.exe'
-        ; 'Inkscape'         = '0.91' +
-        ; 'Hugin'            = '2014.0.0' +
-        ; 'Stellarium'       = '0.14.2' +
-        ; 'Gmvault'          = '1.9'+
         ; 'GIMP'             = 'GIMP 2\bin\gimp-2.8.exe'         ; 'GIMP'             = 'GIMP 2\bin\gimp-2.8.exe'
         ; '7zip'             = '7-Zip\7z.exe'         ; '7zip'             = '7-Zip\7z.exe'
         ; 'WinMerge'         = 'WinMerge\WinMergeU.exe'         ; 'WinMerge'         = 'WinMerge\WinMergeU.exe'
-        ; 'Foobar2000'       = 'foobar2000\uninstall.exe'+#       ; 'Foobar2000'       = 'foobar2000\foobar2000.exe'
         ; 'Fiddler'          = 'Fiddler2\fiddler.exe'         ; 'Fiddler'          = 'Fiddler2\fiddler.exe'
-        ; 'Process Explorer' = 'C:\sysinternals\procexp.exe' +        ; 'Process Explorer' = 'C:\tools\sysinternals\procexp.exe' 
-        ; 'Process Monitor'  = 'C:\sysinternals\procmon.exe' +        ; 'Process Monitor'  = 'C:\tools\sysinternals\procmon.exe' 
-        ; 'VLC'              = 'VideoLAN\VLC\vlc.exe'+       ; 'VLC'              = 'VideoLAN\VLC\vlc.exe'
         ; 'FileZilla'        = 'FileZilla FTP Client\filezilla.exe'         ; 'FileZilla'        = 'FileZilla FTP Client\filezilla.exe'
-        ; 'ImageMagick'      = 'ImageMagick\mogrify.exe' +#        ; 'ImageMagick'      = 'ImageMagick\magick.exe' 
-        ; 'TortoiseSVN'      = 'TortoiseSVN\bin\TortoiseSVN.dll'+       ; 'TortoiseSVN'      = 'TortoiseSVN\bin\TortoiseSVN.dll'
         ; 'WinDirStat'       = 'WinDirStat\windirstat.exe'         ; 'WinDirStat'       = 'WinDirStat\windirstat.exe'
-        ; 'LibreOffice'      = 'LibreOffice 5\program\soffice.exe' +#        ; 'LibreOffice'      = 'LibreOffice 5\program\soffice.exe' 
-        ; 'VirtualBox'       = 'Oracle\VirtualBox\VBoxSVC.exe' +       ; 'VirtualBox'       = 'Oracle\VirtualBox\VBoxSVC.exe' 
-        ; 'Taxati          = 'tixati\tixati.exe' +       ; 'Tixati          = 'tixati\tixati.exe' 
-        ; 'VeraCrypt'        = 'VeraCrypt\VeraCrypt.exe' +       ; 'VeraCrypt'        = 'VeraCrypt\VeraCrypt.exe' 
-        ; 'IrfanView'        = 'IrfanView\i_view32.exe'+       ; 'IrfanView'        = 'IrfanView\i_view32.exe'
 } }
  
 +function WebRequest ($url) {
 +    [net.httpwebrequest]$httpwebrequest = [net.webrequest]::create($url)
 +    [net.httpWebResponse]$httpwebresponse = $httpwebrequest.getResponse()
 + 
 +    if (!$httpwebresponse) {
 +        return $null
 +    }
 + 
 +    $reader = new-object IO.StreamReader($httpwebresponse.getResponseStream())
 +    $WSResponse = $reader.ReadToEnd()
 +    $reader.Close()
 + 
 +    return $WSResponse
 +}
 + 
 function WebRequest ($url) { function WebRequest ($url) {
     [net.httpwebrequest]$httpwebrequest = [net.webrequest]::create($url)     [net.httpwebrequest]$httpwebrequest = [net.webrequest]::create($url)
Line 179: Line 190:
         {         {
             CheckCurrentVersionNumber 'Anki' 'http://ankisrs.net/' `             CheckCurrentVersionNumber 'Anki' 'http://ankisrs.net/' `
-                'href="http://ankisrs\.net/download/mirror/anki-(?<versionNumber>\d+(?:\.\d+){2})\.exe"' `+                '>Download Anki for Windows Vista/7/8/10 \((?<versionNumber>\d+(?:\.\d+){2})\)<' `
                 $appsToCheck['Anki']                 $appsToCheck['Anki']
         }         }
Line 208: Line 219:
         'Notepad++'         'Notepad++'
         {         {
-            CheckCurrentVersionNumber 'Notepad++' 'http://notepad-plus-plus.org/download/' ` +            CheckCurrentVersionNumber 'Notepad++' 'http://notepad-plus-plus.org/'
-                '<title>Notepad\+\+ v(?<versionNumber>\d+(?:\.\d+){1,3}) - Current Version</title>' `+                '>Current Version:\s*(?:<\w+>\s*)*(?<versionNumber>\d+(?:\.\d+){1,3})<' `
                 $appsToCheck['Notepad++']                 $appsToCheck['Notepad++']
         }         }
Line 215: Line 226:
         {         {
             CheckCurrentVersionNumber 'Inkscape' 'http://inkscape.org/en/download/windows' `             CheckCurrentVersionNumber 'Inkscape' 'http://inkscape.org/en/download/windows' `
-                '>Latest stable version \((?<versionNumber>\d+(?:\.\d+){1,2})\)<' `+                '>Latest stable version: Inkscape ?(?<versionNumber>\d+(?:\.\d+){1,2})<' `
                 $appsToCheck['Inkscape']                 $appsToCheck['Inkscape']
         }         }
Line 232: Line 243:
         'Gmvault'         'Gmvault'
         {         {
-            CheckCurrentVersionNumber 'Gmvault' 'http://gmvault.org/download.html' ` +            CheckCurrentVersionNumber 'Gmvault' 'http://gmvault.org/'
-                '<h2>Gmvault v(?<versionNumber>\d+(?:\.\d+){1,2})<\/h2>' `+                'Download\s+Gmvault<small>\s*\((?<versionNumber>\d+(?:\.\d+){1,2})\s*\)\s*</small>' `
                 $appsToCheck['Gmvault']                 $appsToCheck['Gmvault']
         }         }
Line 241: Line 252:
         {         {
             CheckLocalFile 'GIMP' 'http://www.gimp.org/downloads/' `             CheckLocalFile 'GIMP' 'http://www.gimp.org/downloads/' `
-                '>The current stable release of.+?GIMP.+? is <strong>(?<versionNumber>\d+(?:\.\d+){2})<\/strong>' `+                '>The current stable release of GIMP is <(b|strong)>(?<versionNumber>\d+(?:\.\d+){2})<\/(b|strong)>' `
                 $appsToCheck['GIMP'] ''                 $appsToCheck['GIMP'] ''
         }         }
Line 265: Line 276:
         'Fiddler'         'Fiddler'
         {         {
-            CheckLocalFile 'Fiddler' 'http://www.telerik.com/download/fiddler' ` +            CheckLocalFile 'Fiddler' 'https://chocolatey.org/packages/fiddler4' ` 
-                '>Fiddler for \.NET4</h3>\s*<p class=".+?">Version (?<versionNumber>\d+(?:\.\d+){2,3}),' ` +                '<title>\s*Chocolatey\s+Gallery\s*\|\s*Fiddler\s*(?<versionNumber>\d+(?:\.\d+){2})'
-                $appsToCheck['Fiddler'] ''+                $appsToCheck['Fiddler'
 +                ';FirstThreeDigitsOnly;'
         }         }
         'Process Explorer'         'Process Explorer'
Line 346: Line 358:
         {         {
             CheckLocalFile 'VirtualBox' 'http://www.virtualbox.org/wiki/Downloads' `             CheckLocalFile 'VirtualBox' 'http://www.virtualbox.org/wiki/Downloads' `
-                '>VirtualBox (?<versionNumber>\d+(?:\.\d+){1,2}) for Windows hosts<' `+                '\>\s*VirtualBox\s*(?<versionNumber>\d+(?:\.\d+){1,2})\s*platform\s*packages\s*\<' `
                 $appsToCheck['VirtualBox'] `                 $appsToCheck['VirtualBox'] `
                 ';FirstThreeDigitsOnly;'                 ';FirstThreeDigitsOnly;'
         }         }
-        'Taxati'+        'Tixati'
         {         {
-            CheckLocalFile 'Taxati' 'http://www.tixati.com/download/' `+            CheckLocalFile 'Tixati' 'http://www.tixati.com/download/' `
                 '>Download Tixati v(?<versionNumber>\d+\.\d+)<' `                 '>Download Tixati v(?<versionNumber>\d+\.\d+)<' `
-                $appsToCheck['Taxati'] ''+                $appsToCheck['Tixati'] ''
         }         }
         'VeraCrypt'         'VeraCrypt'
         {         {
-            CheckLocalFile 'VeraCrypt' 'http://veracrypt.codeplex.com/'+            CheckLocalFile 'VeraCrypt' 'https://veracrypt.codeplex.com/wikipage?title=Downloads' ` 
-                '>\s*VeraCrypt version (?<versionNumber>\d+\.\d+)\s*<' `+                '>Latest Stable Release - (?<versionNumber>\d+\.\d+)' `
                 $appsToCheck['VeraCrypt'] ''                 $appsToCheck['VeraCrypt'] ''
         }         }
Line 367: Line 379:
                 'Current IrfanView version is: <b>(?<versionNumber>\d+\.\d+)' `                 'Current IrfanView version is: <b>(?<versionNumber>\d+\.\d+)' `
                 $appsToCheck['IrfanView'] ''                 $appsToCheck['IrfanView'] ''
 +        }
 +        'Deluge'
 +        {
 +            CheckLocalFile 'Deluge' 'http://deluge-torrent.org/' `
 +                '\>\s*(?<versionNumber>\d+(?:\.\d+)+)\s*\<' `
 +                $appsToCheck['Deluge'] `
 +                ';FirstThreeDigitsOnly;'
         }         }
         default         default
Line 377: Line 396:
 cls cls
 foreach ($appName in $AppsToCheck.Keys) { CheckAppCurrentVersionNumber ($appName) } foreach ($appName in $AppsToCheck.Keys) { CheckAppCurrentVersionNumber ($appName) }
-#CheckAppCurrentVersionNumber 'IrfanView'+#CheckAppCurrentVersionNumber 'Fiddler'
 </code> </code>
powershell_check_for_updates.1454720152.txt.gz · Last modified: 2017/01/01 19:51 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki