10

I am currently deploying some files through GPP to a folder under program files. I now have to differ between a 64bits and 32bits os. What is the easy way to filter out what computer to target with the targeting editor?

  1. Wmi: SELECT * FROM Win32_Processor WHERE AddressWidth = 32
  2. environment: programfilesx86
  3. registry: ???
  4. os selection in the targeting editor

I am currently looking at using a WMI select, but it seems a but it seems overkill. What method is the best?

Bård
  • 767
  • 1
  • 6
  • 12

2 Answers2

19

In my experience if there is an issue with WMI on the system it can not run the query. If you are using Windows 2008 preferences then I would use a environment variable for the Group Policy item-level targeting filter.

For x64 the environment variable %Processor_Architecture% is AMD64

For x86 the environment variable %Processor_Architecture% is x86

Environment variables are much more stable than WMI

jscott
  • 24,204
  • 8
  • 77
  • 99
Ryan
  • 191
  • 1
  • 2
  • 2
    I use this a lot. It works better than WMI in my experience. – myron-semack Feb 20 '13 at 14:42
  • The performance impact is the bigger determining factor in my opinion. Both solutions work, however, this method will result in significantly faster execution. WMI is great and is a invaluable tool in every admins toolbox, however, it is extremely slow in most instances and should be avoided whenever possible. – Nick W. Mar 10 '22 at 18:27
14

The WMI Filter method is the best one to use because it's defined seperately of the GPO, natively administered in the GPMC, and can be linked to one or more GPOs as required.

Target 32-bit OS's with:

  • Namespace: root\CIMv2
  • Query: Select * from Win32_Processor where AddressWidth = '32'

Target 64-bit OS's with:

  • Namespace: root\CIMv2
  • Query: Select * from Win32_Processor where AddressWidth = '64'
aharden
  • 1,460
  • 10
  • 11