Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have found a number of scripts that can output a list of installed programs but not really in the correct format. I would like one script to output installed programs and another script to output installed hotfixes/patches/updates. I will be calling both of these from a batch file and outputing to a text file. Anyone know where I can find such scripts or similar?

I don't know how to do that. Plus, I suspect using the api will produce a list of programs and hotfixes/updates. Also, would this method work on older machines, say win98?

to output hotfixes, type:
C:\>systeminfoto list out installed program, one of the many methods i can think of is using WMI. here is the vbs auto-generatad code by scriptomatic:
On Error Resume Next Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 arrComputers = Array(".") For Each strComputer In arrComputers WScript.Echo WScript.Echo "==========================================" WScript.Echo "Computer: " & strComputer WScript.Echo "==========================================" Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Product", _ "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each objItem In colItems WScript.Echo "Caption: " & objItem.Caption WScript.Echo "Description: " & objItem.Description WScript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber WScript.Echo "InstallDate: " & objItem.InstallDate WScript.Echo "InstallDate2: " & WMIDateStringToDate(objItem.InstallDate2) WScript.Echo "InstallLocation: " & objItem.InstallLocation WScript.Echo "InstallState: " & objItem.InstallState WScript.Echo "Name: " & objItem.Name WScript.Echo "PackageCache: " & objItem.PackageCache WScript.Echo "SKUNumber: " & objItem.SKUNumber WScript.Echo "Vendor: " & objItem.Vendor WScript.Echo "Version: " & objItem.Version WScript.Echo Next Next Function WMIDateStringToDate(dtmDate) WScript.Echo dtm: WMIDateStringToDate = CDate(Mid(dtmDate, 5, 2) & "/" & _ Mid(dtmDate, 7, 2) & "/" & Left(dtmDate, 4) _ & " " & Mid (dtmDate, 9, 2) & ":" & Mid(dtmDate, 11, 2) & _ ":" & Mid(dtmDate,13, 2)) End Functionfor nt dos version, type wmic/?

![]() |
C++ And FTP
|
text file list
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |