Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for revo_ver.kix

(view source code of revo_ver.kix as plain text)

  1. Break On
  2.  
  3. "Latest version of Revo Uninstaller Freeware : " + GetRevoVersion( "Free" ) + @CRLF
  4. "Latest version of Revo Uninstaller Pro      : " + GetRevoVersion( "Pro"  )
  5.  
  6.  
  7. Function GetRevoVersion( $myType )
  8. ; This function returns the latest Revo Uninstaller
  9. ; version as string by reading Revo's download page.
  10. ; If an error occurs, the returned version will be "0".
  11. ; Written by Rob van der Woude
  12. ; http://www.robvanderwoude.com
  13. 	; Initial return string, in case an error occurs
  14. 	$strRevoVersion = "0"
  15. 	; Use WinHTTP to read the text from Revo's download page
  16. 	$objHTTP = CreateObject( "WinHttp.WinHttpRequest.5.1" )
  17.  
  18. 	If UCase( $myType ) = "PRO"
  19. 		$RC = $objHTTP.Open( "GET", "http://www.revouninstaller.com/revo_uninstaller_pro_full_version_history.html", 0 )
  20. 	Else
  21. 		$RC = $objHTTP.Open( "GET", "http://www.revouninstaller.com/revo_uninstaller_full_version_history.html", 0 )
  22. 	EndIf
  23. 	$strUserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"
  24. 	$RC = $objHTTP.SetRequestHeader( "UserAgent", $strUserAgent )
  25. 	$RC = $objHTTP.Send
  26. 	If $objHTTP.Status = 200
  27. 		; If the page was returned, use a regular expression
  28. 		; to extract Foxit Reader's current version number
  29. 		$strHTML = $objHTTP.ResponseText
  30. 		If UCase( $myType ) = "PRO"
  31. 			$strPattern = "Revo Uninstaller Pro version "
  32. 		Else
  33. 			$strPattern = "Revo Uninstaller Freeware version "
  34. 		EndIf
  35. 		$strVersion = Trim( SubStr( $strHTML, InStr( $strHTML, $strPattern ) + Len( $strPattern ), 7 ) )
  36. 		$strVersion = Left( $strVersion, InStr( $strVersion, "<" ) - 1 )
  37. 	EndIf
  38. 	; Return the result
  39. 	$GetRevoVersion = $strVersion
  40. EndFunction
  41.  

page last modified: 2024-04-16; loaded in 0.0056 seconds