Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for mdacver.kix

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

  1. If $Help <> ""
  2. 	? "MDACVer.kix,  Version 1.00"
  3. 	? "Check the installed MDAC version, and optionally compare it to a"
  4. 	? "specified minimum required version number"
  5. 	?
  6. 	? "Usage:  KIX32.EXE  mdacver.kix  [ $ReqVer=min_req | $Help=x]"
  7. 	?
  8. 	? "Where:  " + Chr(34) + "min_req" + Chr(34) + "  is the minimum required version; the script will"
  9. 	? "                   return a return code 1 if the actual MDAC version"
  10. 	? "                   is older than the minimum specified, or 0 if it is"
  11. 	? "                   equal or newer or if no minimum was specified."
  12. 	? "        " + Chr(34) + "x" + Chr(34) + "        can be anything to display this help"
  13. 	?
  14. 	? "Written by Rob van der Woude"
  15. 	? "http://www.robvanderwoude.com@CRLF"
  16. 	Exit 1
  17. EndIf
  18.  
  19.  
  20. $intRC = 0
  21.  
  22. ; Create a connection object
  23. $AdoDbConn = CreateObject( "ADODB.Connection" )
  24.  
  25. ; Display the (MDAC) version number
  26. ? "MDAC Version " + $AdoDbConn.Version + @CRLF
  27.  
  28. ; If a minimum required version was specified, compare it to
  29. ; the actual version and return a non-zero return code if the
  30. ; required minimum wasn't met
  31. If $AdoDbConn.Version < $ReqVer
  32. 	$intRC = 1
  33. EndIf
  34.  
  35. $AdoDbConn = Nothing
  36.  
  37. ; End the script, and return the result of the comparison
  38. Exit $intRC
  39.  

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