hklm = X2D(80000002)
strcomputer = "."
strkey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"
strentry1a = "DisplayName"
strentry1b = "QuietDisplayName"
strentry2 = "InstallDate"
strentry3 = "VersionMajor"
strentry4 = "VersionMinor"
strentry5 = "EstimatedSize"
objreg = getobject("winmgmts://" || strcomputer || "/root/default:StdRegProv")
objreg~enumkey(hklm, strkey, arrsubkeys)
SAY "Installed Applications"
DO strsubkey OVER arrsubkeys
intret1 = objreg~getstringvalue(hklm, strkey || strsubkey, strentry1a, strvalue1)
IF intret1 \= 0 THEN
objreg~getstringvalue(hklm, strkey || strsubkey, strentry1b, strvalue1)
IF strvalue1 \= "" THEN
SAY "Display Name:" strvalue1
objreg~getstringvalue(hklm, strkey || strsubkey, strentry2, strvalue2)
IF strvalue2 \= "" THEN
SAY "Install Date:" strvalue2
objreg~getdwordvalue(hklm, strkey || strsubkey, strentry3, intvalue3)
objreg~getdwordvalue(hklm, strkey || strsubkey, strentry4, intvalue4)
IF intvalue3 \= "" THEN
SAY "Version:" intvalue3 || "." || intvalue4
objreg~getdwordvalue(hklm, strkey || strsubkey, strentry5, intvalue5)
IF intvalue5 \= "" THEN
SAY "Estimated Size:" || TRUNC(intvalue5/1024, 3) "megabytes"
END |