Cannot retrieve Application InstallPath

J

Joseph

Hi all,

For some reason using the code below I can only retrieve the App Name &
InstallDate but nothing else,
any idea why?

BTW the code is a little longer than necessary for this question but it
might be useful to someone else
as I learned last week from another post how to use the recordset.

'
'Create a RecordSet
'
Const adVarChar = 200
Const MaxCharacters = 255

Set DataList = CreateObject("ADOR.Recordset")
DataList.Fields.Append "AppName", adVarChar, MaxCharacters
DataList.Fields.Append "AppInstDate", adVarChar, MaxCharacters
DataList.Fields.Append "AppInstallLocation", adVarChar, MaxCharacters
DataList.Fields.Append "AppDescription", adVarChar, MaxCharacters
DataList.Fields.Append "AppVersion", adVarChar, MaxCharacters
DataList.Open
'
'Search for Installed Applications
'
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer &
"\root\cimv2")
Set colSoftware = objWMIService.ExecQuery _
("Select * from Win32_Product")
MsgMSIE "Discovering Installed Applications..."
ChangeHTMLWindowStatusMsg "Discovering Installed Applications..."
MsgMSIE ""

'
'Gather information and populate the Recordset
'
For Each objSoftware in colSoftware

ChangeHTMLWindowStatusMsg "objSoftware.Name: " & objSoftware.Name
DataList.AddNew
DataList("AppName") = objSoftware.Name
DataList("AppInstDate") = objSoftware.InstallDate
' DataList("AppInstallLocation") = objSoftware.InstallLocation
' DataList("AppDescription") = objSoftware.Description
' DataList("AppVersion") = objSoftware.Version
DataList.Update
Next
'
'
'Sort the list by Application Name
'
DataList.Sort = "AppName"
'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top