I need to determine if a computer is in fact a laptop with wifi capabilities (with emphasis on wifi rather than laptop). More precisely, I want to distribute a piece of software I wrote via WSUS and Local Update Publisher to those clients. To this end, I want to create appropriate "Package installable rules", that is simple rule used bay the Windows Update Service on the client to decide beforehand whether or not an update/installation package is applicable. Typically, such "installabel rules" are logical combinations of rules of type "File exists", "Registry Key exists", "WMI Query", "MSI Product Installed", so I'd prefer one of those methods. The method I hope someone here can help me find should work with Win 7/Vista, preferably also with XP.

My guess is that WMI query is the way to go, but I have little experience in that. I have found that one can e.g. query for EnclosureType and that might detect a laptop. However, I would be much happier if an actually available wifi interface would be detected. Does anyone have an idea how to approach this?

If there is anything you need me to clarify, don't hesitate to comment.

  • 1
    WSUS cannot push custom installs, as far as I know. Dec 13, 2012 at 23:32
  • I think it can, but I've never done it: msdn.microsoft.com/en-us/library/aa970328(VS.85).aspx Dec 14, 2012 at 4:15
  • I'm already pushing dozens of custom installs (via LocalUpdatePublisher). My problem is rather concerned with configuring such an update of mine so that it applies only to wifi capable clients. Dec 14, 2012 at 11:50
  • Neato... why not do a WMI query and check and see if the wireless service is running? That ought to do it. Dec 16, 2012 at 14:05
  • @SpacemanSpiff D'oh, that was more or less what I'm looking for. But I failed at formulating a working SELECT * FROM CheckAndSeeIfTheWireLessServiceIsRunning Dec 16, 2012 at 22:57

1 Answer 1


To test whether the WLAN AutoConfig service is running using WMI you can use this query: SELECT * FROM Win32_Service WHERE Name = 'Wlansvc' AND State = 'Running'. However relying on the service status might be misleading if the service is started manually without a wireless card present.

You can also search the adapter names for anything containing "wireless" with this query: SELECT * FROM Win32_NetworkAdapterConfiguration WHERE Description LIKE '%wireless%' (% is WMI's wildcard for zero or more characters).

There is another class in the root\wmi namespace (previous queries were using the default root\cimv2 namespace) that represents an 802.11 configuration entry, however I found out that support for it is not always present so it shouldn't be used as the only method of detection: SELECT * FROM MSNdis_80211_Configuration.

I've had no experience with using WSUS Local Update Publisher so I can't help you with the exact implementation of WMI queries, but you can test them in PowerShell using Get-WmiObject -Query "<query>" or Get-WmiObject -Query "<query>" -Namespace <namespace> if you require a custom namespace.

  • Thanks a lot! At least the first query seems to do what it is supposed to do, so I'll next try all those refinements with the other criteria as well. Dec 18, 2012 at 8:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.