Discussion Locked

Software Inventory Scripts

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi All Scripting Expects;

I'm in need of help to build a Software Inventory Scripts to capture all software install listed in the Control Pannel (Add/Remove Programs)of local computers.

Have found and edit a scripts to extract to excel file but with the following problem.
1. list override each others
2. Only MSI installed program are listed (Need all programs).

Thanks for responding
Regards
Shawn
--------------------------------------------------

Dim objExcel
Dim objWbem
Dim colInstProducts
Dim objProduct
Dim colFeatures
Dim objFeature
Dim blnDetails
Dim strComputer

Set objExcel = WScript.CreateObject("Excel.Application")
objExcel.Visible = True
objExcel.Workbooks.Add
objExcel.ActiveSheet.Name = "Delco Invent 1"
objExcel.ActiveSheet.Range("A1").Activate
objExcel.ActiveCell.Value = "Com Name"
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3

If WScript.Arguments.Count = 2 Then
Set objWbem = GetObject("winMgmts:\\" & strComputer)
Set colInstProducts = objWbem.InstancesOf("Win32_Product")
Else
Set objWbem = GetObject("winmgmts:\\" & strComputer)
Set colInstProducts = objWbem.InstancesOf("Win32_Product")
End If

If Err <> 0 Then
WScript.Echo "Could not connect to WMI"
WScript.Quit
End If

'Loop through Products adding report entries
For Each objProduct in colInstProducts
' WScript.Echo "-----------------------------------------"
objExcel.ActiveCell.offset(0,1)= objProduct.Name
objExcel.ActiveCell.offset(0,2)= objProduct.Version
objExcel.ActiveCell.offset(0,3)= objProduct.Vendor

Next

6 replies

by joseph moore

Well, I did a similar thing by using PSINFO.EXE from Sysinternals.

http://www.sysinternals.com/ntw2k/freeware/psinfo.shtml

This tool can pull all installed software from a remote Windows machine. The syntax is:
PSINFO \\REMOTEMACHINE -s -U USERNAME -P PASSWORD

So, if you are an administrator on your Windows network, you don't need to use the username or password switches.

What you can do is run a BAT file with multiple lines in it:
PSINFO \\MACHINE1 -s >LOGFILE.TXT
PSINFO \\MACHINE2 -s >>LOGFILE.TXT
PSINFO \\MACHINE3 -s >>LOGFILE.TXT
etc.

Each line will run, query the remote system, and output the results to a single log file called LOGFILE.TXT. You would then look through this log file for your data.

hope this helps

by shawnyong

Hi, thank for the reply , but this is not i want. if you see i'm extracting to execl file. i will create the remote pc part later, now what i need is to extract to all software.

by joseph moore

Well, I did a similar thing by using PSINFO.EXE from Sysinternals.

http://www.sysinternals.com/ntw2k/freeware/psinfo.shtml

This tool can pull all installed software from a remote Windows machine. The syntax is:
PSINFO \\REMOTEMACHINE -s -U USERNAME -P PASSWORD

So, if you are an administrator on your Windows network, you don't need to use the username or password switches.

What you can do is run a BAT file with multiple lines in it:
PSINFO \\MACHINE1 -s >LOGFILE.TXT
PSINFO \\MACHINE2 -s >>LOGFILE.TXT
PSINFO \\MACHINE3 -s >>LOGFILE.TXT
etc.

Each line will run, query the remote system, and output the results to a single log file called LOGFILE.TXT. You would then look through this log file for your data.

hope this helps

by abarnes70

If you have the NT or 2000 Resource Kit, you could use the REGDMP command to query the Uninstall in the registry and pipe it to the find command, such as

regdmp HKEY_LOCAL_MACHINE\software\microsoft\windows\currentversion\uninstall | find /i "display"

This displays only the lines that contain "display" in them, which will include, for example:

DisplayName = Microsoft Office 2000 Professional
DisplayVersion = 9.00.3907
DisplayName = WinZip
DisplayVersion = 9.00.2720

and so on. You could then use Excel code to tidy it up into a nice format.

by nemesis"t"warlock

I suggest you take a look at the program on the site listed below called Aida32. It is a free utility that can be used to do what you need without a requirement for scripting (or any cash layout).

It has options for remote or local launch and can output data to multiple formats including .CSV that you would be able to use in Excel.

It may offer you what you are looking for and more.

http://www.aida32.hu/aida32.php

This discussion is closed to new replies.