WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: bettman on September 23, 2014, 07:18:21 AM

Title: Device Manager
Post by: bettman on September 23, 2014, 07:18:21 AM
Greetings,

Does Winbatch have a way to search for a specific piece of hardware that exists in Device Manager? Specifically I would like to have a script look to see if there is any hardware listed under Security Devices; if it's there do one thing, if not do something else.

Thanks for any help that could be given.
Title: Re: Device Manager
Post by: td on September 23, 2014, 01:15:15 PM
 I am not aware of any WMI classes that are related to security devices so WMI may not be an option.

Many devices including the ones you see listed in the Device Manager can be detected by examining the keys under the 'HKLM\SYSTEM\CurrentControlSet' registry path.  However, you would have to figure out which keys relate to your security devices. If you happen to have access to one of the devices .inf files, you could look for registry directives in it that may tell you what to look for in the registry.

There's always DevCon and msinfo32 command line utilities. More information about them can be found here

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/How~To+Enumerate~Devices.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/How~To+Enumerate~Devices.txt)