I’m working on some relevance to check to see if the onboard wired NIC is enabled or not. If it’s disabled, then I’m figuring on using devcon.exe to enable/disable it (see: http://support.microsoft.com/kb/311272).
I’m not entirely close to it yet, but I’m looking at “active devices whose (class of it = “Net” and description of it ends with “Controller” and status of it = ???)”
Anyone have any info on the status bits of the device driver status? I can see on this laptop that enabled it’s 25174026 and disabled it’s 25175040. Referencing "status of " in the BES inspector docs.
It sounds like you found a solutoin, but if not you could also try looking under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum for your device. If it’s enabled, ConfigFlags should be set to 0x0. If it’s disabled, I think ConfigFlags is set to 0x1.
Thanks boyd, that’s a bigger help than using the active device object.
Using my previous method I suppose either would work:
exists active device whose (class of it = “Net” and description of it contains “Gigabit” and not bit 1 of status of it)
or
exists problem id of active device whose (class of it = “Net” and description of it contains “Gigabit” and not bit 1 of status of it)
Bit in both cases it takes 184ms to 235ms to determine (ouch!)
This was much faster at only .82ms to 1.21ms:
exists key whose (exists key whose (value “Class” of it = “Net” and value “DeviceDesc” of it as string contains “Gigabit” and value “ConfigFlags” of it = 1) of it) of key “HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum\PCI” of registry