Not Exists in WMI Query

Hi,

I need to use a fiilter for my MSI. I need to check that the product XXX is not installed.

I need to write something like this

SELECT * FROM Win32_Product WHERE NOT EXISTS (SELECT * FROM Win32_Product WHERE Name = "XXX")

Any Idea ?

Thanks in advance

[396 byte] By [Mazzica] at [2007-12-26]
# 1

Hello All.

Mazzica:

Check out this link on WMI queries:

http://msdn2.microsoft.com/en-us/library/ms186146.aspx

HTH.

MarkBenningfield at 2007-9-4 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 2
Thank you for the link.

I already visited the link but couldn't find a solution to my WMI query.

Do you know how to manage it ?

Mazzica at 2007-9-4 > top of Msdn Tech,.NET Development,.NET Base Class Library...
# 3

Hello All.

Mazzica:

Just write a query to select all of the Win32 products, and loop through the collection to see if any of them match your target product. If there is a match, then you know that the product is installed.

HTH

MarkBenningfield at 2007-9-4 > top of Msdn Tech,.NET Development,.NET Base Class Library...

.NET Development

Site Classified