httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jlwpc1" <jlw...@mail.earthlink.net>
Subject Re: Installing 2.0.39 over 2.0.35 on Win2K with MSI package
Date Wed, 19 Jun 2002 19:31:29 GMT


<snip>

: I have a Windows 2000 machine
: I'd like to upgrade to 2.0.39.
: it asks me to uninstall the previous version first.
: I am asked for the 2.0.35 version of the MSI package,
: which I no longer have
: If I can somehow get it out of the MSI database

</snip>

Try the below simple, non error checking
VBScript that lists the name of the MSI file
for Apache and this file's location.

'========== Start of show-msi.vbs ================

' Get the WMI object.
Set objWMI = GetObject("winmgmts:")

' Define a WMI's query string - Need the ( _ )
' underline at end of the first part of the string,
' to continue the string on to the next line.
strQuery = "Select * From Win32_Product Where"_
& " Vendor = 'Apache Software Foundation' "

' Get a collection of the returned features
' ( that is - information) from WMI.
Set colFeatures = objWMI.ExecQuery(strQuery)

' Quit if nothing is found by WMI.
If colFeatures.Count <= 0 Then
  Wscript.Echo strQuery
  Wscript.Echo "Is above written correctly?"
  Wscript.Echo "If yes, then nothing was found."
  Wscript.Quit
End If

' List found "objects" of information
' from the "collection".
For Each objFeature In colFeatures
  Wscript.Echo "Caption: " & objFeature.Caption
  Wscript.Echo "Description: " & objFeature.Description
  Wscript.Echo "IdentifyingNumber: " & objFeature.IdentifyingNumber
  Wscript.Echo "Install Date: " & objFeature.InstallDate
  Wscript.Echo "Install State: " & objFeature.InstallState
  Wscript.Echo "Install Location: " & objFeature.InstallLocation
  Wscript.Echo "Name: " & objFeature.Name
  Wscript.Echo "PackageCache: " & objFeature.PackageCache
  Wscript.Echo "SKUNumber: " & objFeature.SKUNumber
  Wscript.Echo "Vendor: " & objFeature.Vendor
  Wscript.Echo "Version: " & objFeature.Version
  Wscript.Echo
Next

'========== End of show-msi.vbs =================

Cut show-msi.vbs and run in a command line window like:

cscript.exe show-msi.vbs

Runs on Windows 95 to Windows XP
but, old Windows 9X and Windows NT
might need to install the WMI objects!

Download WMI Core for W9x and NT 4.0 here (URL might wrap!):
http://msdn.microsoft.com/downloads/default.asp?url=/downloads/sample.
asp?url=/msdn-files/027/001/576/msdncompositedoc.xml

For more Windows scripting:

WSH Scripting
http://msdn.microsoft.com/scripting/

Online The System Administration Scripting Guide
http://www.microsoft.com/technet/scriptcenter/sampscr.asp

VBScript Reference
http://msdn.microsoft.com/library/en-us/script56/html/vtoriVBScript.as
p

JLW














---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message