Solved

WMI Filter to exclude an application

Posted on 2009-04-14
3
677 Views
Last Modified: 2012-05-06
I want to install the PowerPoint Viewer on any machine without an instance of PowerPoint installed.  My filter code is this -

SELECT * FROM Win32_Product
WHERE Name <> 'Microsoft Office PowerPoint%'

Although it installed on a test machine with PowerPoint 2007.  Do you know what the error in my syntax is?
0
Comment
Question by:rosederekj
  • 2
3 Comments
 
LVL 70

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 24136437

You should be able to capture it with:

SELECT * FROM Win32_Product WHERE NOT Name LIKE 'Microsoft Office PowerPoint%'

It's just you can't use <> or = along with wildcards (% and _), only for explicit values, LIKE has to be used and if negation of that condition is needed NOT must appear before the condition.

Chris
0
 

Author Comment

by:rosederekj
ID: 24137061
Thanks, much appreciated, that worked perfectly.
0
 

Author Closing Comment

by:rosederekj
ID: 31569825
Perfect!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
The viewer will learn how to count occurrences of each item in an array.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now