Results 1 to 3 of 3

Thread: The WMI filter doesn't work!

  1. #1
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    Hi! At work we're deploying Norton AV and we'd like to install Outlook 2003 clients too. Ok, i prepared the policy for Outlook and it worked fine but i realized that I didn't want to install outlook 2003 on some brand new Dell computers that are in the Domain and come with Outlook 2007 (when 2003 gets installed on top of 2007, none works fine)
    So :
    a .vbs code like this:
    [code:1]
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
    Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_ComputerSystem", "WQL", _
    wbemFlagReturnImmediately + wbemFlagForwardOnly)
    For Each objItem In colItems
    WScript.Echo "Manufacturer: " & objItem.Manufacturer
    WScript.Echo "Model: " & objItem.Model
    WScript.Echo "Name: " & objItem.Name
    WScript.Echo
    Next
    Next

    [/code]
    Returns this (on these Dell Computers..):
    Manufacturer: Dell Inc.
    Model: OptiPlex 755
    Name: CAP05-P020
    -------------------------------------------------------------------------------

    So i decided to make a WMI filter like this:

    [code:1]SELECT * FROM Win32_ComputerSystem WHERE Manufacturer <> ' Dell Inc.'
    [/code]

    But Outlook 2003 got installed on Dell and non-Dells Computers!

    Don't know what to do!

    Thank you.

  2. #2
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    Did you try with double quotes (") instead of single quotes (')?

    Test you WMI filters before deploying anything using this tool:
    http://gpoguy.com/WMIFTest.htm

    More info:
    http://technet2.microsoft.com/windowsserver/en/library/a16cffa4-83b3-430b-b826-9bf81c0d39a71033.mspx?mfr=true
    http://www.freelists.org/archives/gptalk/10-2006/msg00110.html

  3. #3
    PreviousPoster is offline 100+ Helpful Posts! 50+ Helpful Posts
    Join Date
    Dec 1969
    Posts
    1,254

    Default

    I think the Single quote is the correct sintax but i'll try with the tool you told me.

    Thanks for such a quick answer!, I'll comment how it worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Friendly URLs by vBSEO