First, thanks for your terrific script posted in this thread:
https://www.autohotkey.com/boards/viewtopic.php?t=39668
It works well, but the output is missing some items. I ran it on a W7/64-bit system where Control Panel>Programs and Features shows 261 installed programs and 362 installed updates, for a total of 623. But the script shows only 357 (not counting the 11 "For more information..." and 11 "If you later install..." items shown below), so there are 266 missing.
The script shows all 261 installed programs, so all of the missing entries are installed updates. My main purpose in running this script is to look for installed browsers and the problem is that Internet Explorer 11 (which appears in Control Panel>Programs and Features>View installed updates) is one of the missing items. Any ideas on how to change the script to get the missing items?
I don't know if it is part of the problem and/or if it helps in troubleshooting, but, as mentioned above, there are these 22 items in the script's output:
Code: Select all
For more information, visit http://support.microsoft.com/kb/4087364., ,
For more information, visit http://support.microsoft.com/kb/4338420., ,
For more information, visit http://support.microsoft.com/kb/4344146., ,
For more information, visit http://support.microsoft.com/kb/4457016., ,
For more information, visit http://support.microsoft.com/kb/4457035., ,
For more information, visit http://support.microsoft.com/kb/4459942., ,
For more information, visit http://support.microsoft.com/kb/4470640., ,
For more information, visit http://support.microsoft.com/kb/4480055., ,
For more information, visit http://support.microsoft.com/kb/4483451., ,
For more information, visit http://support.microsoft.com/kb/4495588., ,
For more information, visit http://support.microsoft.com/kb/4506997., ,
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
If you later install a more recent service pack, this update will be uninstalled automatically.
Code: Select all
; teadrinker original script except for FileAppend instead of MsgBox
; https://www.autohotkey.com/boards/viewtopic.php?t=39668
#NoEnv
SetBatchLines, -1
headers := [ "DISPLAYNAME", "VERSION", "PUBLISHER", "PRODUCTID"
, "REGISTEREDOWNER", "REGISTEREDCOMPANY", "LANGUAGE", "SUPPORTURL"
, "SUPPORTTELEPHONE", "HELPLINK", "INSTALLLOCATION", "INSTALLSOURCE"
, "INSTALLDATE", "CONTACT", "COMMENTS", "IMAGE", "UPDATEINFOURL" ]
data := []
for k, v in headers
data.Push( GetAppsInfo({ mask: v, offset: A_PtrSize*(k - 1) }) )
arr := []
for k, v in data
for i, j in v
arr[i, k] := j
for k, v in arr {
str .= (k = 1 ? "" : "`r`n")
for i, j in v
str .= (i = 1 ? "" : ", ") . j
}
;MsgBox, % str
; JW
Output:="c:\temp\InstalledSoftware.txt"
FileDelete,%Output%
FileAppend,%str%,%Output%
Run,%Output%
ExitApp
GetAppsInfo(infoType) {
static CLSID_EnumInstalledApps := "{0B124F8F-91F0-11D1-B8B5-006008059382}"
, IID_IEnumInstalledApps := "{1BC752E1-9046-11D1-B8B3-006008059382}"
, AIM_DISPLAYNAME := 0x00000001
, AIM_VERSION := 0x00000002
, AIM_PUBLISHER := 0x00000004
, AIM_PRODUCTID := 0x00000008
, AIM_REGISTEREDOWNER := 0x00000010
, AIM_REGISTEREDCOMPANY := 0x00000020
, AIM_LANGUAGE := 0x00000040
, AIM_SUPPORTURL := 0x00000080
, AIM_SUPPORTTELEPHONE := 0x00000100
, AIM_HELPLINK := 0x00000200
, AIM_INSTALLLOCATION := 0x00000400
, AIM_INSTALLSOURCE := 0x00000800
, AIM_INSTALLDATE := 0x00001000
, AIM_CONTACT := 0x00004000
, AIM_COMMENTS := 0x00008000
, AIM_IMAGE := 0x00020000
, AIM_READMEURL := 0x00040000
, AIM_UPDATEINFOURL := 0x00080000
pEIA := ComObjCreate(CLSID_EnumInstalledApps, IID_IEnumInstalledApps)
arr := []
while DllCall(NumGet(NumGet(pEIA+0) + A_PtrSize*3), Ptr, pEIA, PtrP, pINA) = 0 {
VarSetCapacity(APPINFODATA, size := 4*2 + A_PtrSize*18, 0)
NumPut(size, APPINFODATA)
mask := "AIM_" . infoType.mask
NumPut(%mask%, APPINFODATA, 4)
DllCall(NumGet(NumGet(pINA+0) + A_PtrSize*3), Ptr, pINA, Ptr, &APPINFODATA)
ObjRelease(pINA)
if !pData := NumGet(APPINFODATA, 8 + infoType.offset) {
arr.Push("")
continue
}
arr.Push( StrGet(pData, "UTF-16") )
DllCall("Ole32\CoTaskMemFree", Ptr, pData) ; not sure, whether it's needed
}
Return arr
}
Thanks much, Joe