Singular expression required

(imported topic written by Darknight)

Hi,

I am trying to generate a report which will have all the softwares installed and shown under add remove program of windows system , in beloe format:

Microsoft Office Standard 2007,12.0.6612.1000,Microsoft Corporation,DIN13001300

and so on.

i am able to get teh output for single value that is :

q:
((string value

of

selects

“Name from Win32_Product”

of

it
)

&

“,”

&

(string value

of

selects

“Version from Win32_Product”

of

it
)
&

“,”

&

(string value

of

selects

“Vendor from Win32_Product”

of

it
))
of

wmi

&

“,”

&
(computer name)

A:
Microsoft Office Standard 2007,12.0.6612.1000,Microsoft Corporation,DIN13001300

but when i try to pull it out for all of the software in the baove fromat , it gives me below error :

q:
((string values

of

selects

“Name from Win32_Product”

of

it
)

&

“,”

&

(string values

of

selects

“Version from Win32_Product”

of

it
)
&

“,”

&

(string values

of

selects

“Vendor from Win32_Product”

of

it
))
of

wmi

&

“,”

&
(computer names)

E:
A singular expression is required.

also in simillar fasion can someone let me know how can we change the below relevance to have simmialr reqult :

(values “DisplayName” of it) of keys whose (exists value “DisplayName” of it AND exists value “UninstallString” of it) of key “HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\Uninstall” of registry

Please advise how can i overcome this.

(imported comment written by jgstew)

There should be an analysis provided by IBM that already does this.

Also, I would recommend doing this through the registry, and not WMI. WMI is much slower and should be avoided when a faster alternative is available.

The general format to get what you want is the following: (this is just an example, and not real relevance)

(displayname of it, displayversion of it,publisher of it) of key “uninstallkeypath” of (registry; (if (x64 of operating system) then x64 registry else nothing))