Skip to content

WQL query where reg key is not present

Featured Replies

Hi

Our hardware inventory is extended to capture some registry values that contain company specific tags.

However, on one of our images a value was missed (not present).

I need to create a collection containing these machines, but I’m struggling to work out how to do this in WQL.

Is it actually possible to use WQL to check if something does not exist (as opposed to being NULL)?

 

Our environment is SCCM 2012 SP1 CU3.

Thanks in advance.

Hi,

 

This is what you are looking for:

http://flylib.com/books/en/2.568.1.35/1/

 

From that post, use the following: SELECT * FROM RegistryValueChangeEvent WHERE Hive = 'HKEY_LOCAL_MACHINE' AND KeyPath = 'SOFTWARE\\MICROSOFT\\WBEM\\CIMOM' AND ValueName = 'Backup Interval Threshold'

 

Cheers Rens!

  • Author

Hi

 

Thanks for posting.

 

However, I'm struggling to understand how this will work in our scenario:

 

Registry key: HKLM\SOFTWARE\OurCompanyName

Value: BuildVersion (REG_SZ)

Data: BuildVersionTag (REG_SZ)

 

The query-based collection I need to create is to be populated by machines which do have the above registry key, but the BuildVersion value and BuildVersionTag data are not present at all.

 

Regards.

  • Author

Thanks for your help.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.