I need to get a list of installed software in a computer to generate a report in VB. Is there anyone know how to get the installed software using VB. Please help.....
Beware though this sometimes does not list all installed software (in my case it missed some import apps out), so i resorted to drilling through the registry to pick up the keys that are used by the ADD/Remove programs control panel
Jamie Gillespie
Senior IT Technician
South Cheshire College
j-gillespie@s-cheshire.ac.uk
To get the best from the forum, read faq222-2244 carefully.
For this question, a quick search on this forum, using the keyword search tab, shows several approaches to this including:
thread222-522146
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first
'If we're supposed to work in Hex, why have we only got A fingers?'
Set oLocator=CreateObject("WbemScripting.SWbemLocator"
strNamespace="root\cimv2"
strPC=Inputbox("Enter a computername to query. DO NOT ENTER THE LOCAL COMPUTER NAME!!!"
strUser=""
strPassword=""
Set oSvc=oLocator.ConnectServer(strPC,strNamespace,strUser,strPassword)
for each prod in oSvc.InstancesOf("Win32_Product"
strYr=Left(prod.InstallDate,4)
strMo=Mid(prod.InstallDate,5,2)
strDy=Right(prod.InstallDate,2)
strInstalled=strMo&"/"&strDy&"/"&strYr
'recursive subroutine call
Sub Enumerate(strKey,refRegistry,numLevel)
Dim arrSubKeys
Dim strSubKey
Dim strIndent
Dim i
'prefix output with correct indentation level
strIndent = ""
For i = 0 To numLevel
strIndent = strIndent + " "
Next
'display output
'WScript.Echo strIndent & strKey
'enumerate any subkeys
If refRegistry.EnumKey( _
HKEY_LOCAL_MACHINE, strKey, arrSubKeys) = 0 Then
For Each strSubKey In arrSubKeys
'recursively call ourselves
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.