(view source code of revo_ver.vbs as plain text)
Option Explicit
WScript.Echo "Latest version of Revo Uninstaller Freeware : " & GetRevoVersion( "Free" )
WScript.Echo "Latest version of Revo Uninstaller Pro : " & GetRevoVersion( "Pro" )
Function GetRevoVersion( myType )
' This function returns the latest Revo Uninstaller (Free/Pro)
' version as string by reading Revo's version history pages.
' If an error occurs, the returned version will be "0".
' Written by Rob van der Woude
' http://www.robvanderwoude.com
Dim objHTTP, objMatch, objRE, strHTML, strUserAgent, strVersion
' Initial return string, in case an error occurs
strVersion = "0"
' Use WinHTTP to read the text from Revo's download page
Set objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
If UCase( myType ) = "PRO" Then
objHTTP.Open "GET", "http://www.revouninstaller.com/revo_uninstaller_pro_full_version_history.html", False
Else
objHTTP.Open "GET", "http://www.revouninstaller.com/revo_uninstaller_full_version_history.html", False
End If
strUserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"
objHTTP.SetRequestHeader "UserAgent", strUserAgent
objHTTP.Send
If objHTTP.Status = 200 Then
' If the page was returned, use a regular expression
' to extract Foxit Reader's current version number
strHTML = objHTTP.ResponseText
Set objRE = New RegExp
If UCase( myType ) = "PRO" Then
objRE.Pattern = "Revo Uninstaller Pro version (\d+\.\d+(\.\d+)?)"
Else
objRE.Pattern = "Revo Uninstaller Freeware version (\d+\.\d+(\.\d+)?)"
End If
objRE.IgnoreCase = False
objRE.Global = False
Set objMatch = objRE.Execute( strHTML )
If objMatch.Count > 0 Then
strVersion = objMatch.Item(0).Submatches.Item(0)
End If
Set objMatch = Nothing
Set objRE = Nothing
End If
Set objHTTP = Nothing
' Return the result
GetRevoVersion = strVersion
End Function
page last modified: 2024-04-16; loaded in 0.0082 seconds