Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
1  
WSUS cannot push custom installs, as far as I know. –  SpacemanSpiff Dec 13 '12 at 23:32
    
I think it can, but I've never done it: msdn.microsoft.com/en-us/library/aa970328(VS.85).aspx –  Ward Dec 14 '12 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. –  Hagen von Eitzen Dec 14 '12 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. –  SpacemanSpiff Dec 16 '12 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 –  Hagen von Eitzen Dec 16 '12 at 22:57

1 Answer 1

up vote 1 down vote accepted
+100

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.

share|improve this answer
    
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. –  Hagen von Eitzen Dec 18 '12 at 8:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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