/* Step 1 : Connect to current machine*/
ISWbemServices wbemServices = wbemLocator.connectServer("localhost", "Root\\CIMv2", "", "", "", "", 0, null);
System.out.println("Connected !");
/*Perform a query*/
// Select informations
ISWbemObjectSet result = wbemServices.execQuery("Select * from Win32_USBDevice", "WQL", 16, null);
// Display query results
for (Com4jObject obj : result) {
ISWbemObject wo = obj.queryInterface(ISWbemObject.class);
wo.getObjectText_(0);
}