We have already explained how to create and import/export a list of allowed devices. However, how can you automatically exclude a device from the Device Control feature once it has been detected? To do that, first you have to identify the device using its unique ID.
Suppose you want to add a USB flash drive to the list of allowed devices (whitelist) after it has been detected.
The first step would be to find out the device's unique ID, which in this case is determined by the CM_DEVCAP_UNIQUEID value.
In the Device Manager, access the properties of the USB device that you want to identify in order to exclude it. Go to the Details tab and select Resources from the Property menu A value called CM_DEVCAP_UNIQUEID should be displayed.
Next, select Device Instance Path from the Property menu to obtain the device's unique ID.
If the device does not have the CM_DEVCAP_UNIQUEID value, it will not be possible to identify it uniquely. You will then have to use the device's hardware ID to identify it.
In the Property menu, select Hardware ID. By using this value you will exclude from the Device Control feature every USB device of the same model as the detected one, as it won't be possible to differentiate one from the others.