Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to get details of connected devices in windows system.
if any printer connected in port or usb then get information of printer or another device connected in port or usb.
Posted
Comments
Arkadeep De 28-Mar-15 2:14am    
You may go through this link..
http://stackoverflow.com/questions/8678553/how-to-get-the-printer-status-in-wpf?answertab=active#tab-top

1 solution

Use the ManagementObject class[^].
Run a query similar to using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_USBHub"));

Here is an example that uses this class - Obtain System Information Using Windows Management Instrumentation Calls[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900