Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Kindly give a detailed answer. Suppose I have a laptop and a pen-drive, and I insert the pen-drive into the laptop, how do I determine whether the particular pndrive is being used in the system for the first time or not?

share|improve this question
up vote 4 down vote accepted

If you're talking about Windows, this is most-likely due to plug-n-play support. When an unrecognized device is detected (I think primarily using Device ID + Hardware IDs + Compatible IDs, though Vendor_ID and Product_ID might also be used), Windows automatically searches for a driver to install. Though most pen drives just use generic mass storage device drivers, it still has to perform this search process.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USB contains a list of all the devices that have been connected to the machine, including each's VID & PID.

share|improve this answer
Adding to this.. flash drives like SanDisk Cruzers also have some sort of software that come with them, that has to be installed the first time (why can't we just have normal flash drives?) – cutrightjm Apr 21 '12 at 16:53
@ekaj: Are you talking about the U3 autorun software that comes with the U3 Cruzers? – Lèse majesté Apr 21 '12 at 16:55
Ye, or whatever it is.. other flash drives have similar software as well – cutrightjm Apr 21 '12 at 16:59
@RishabhPoddar You might want to retitle your question to something that matches the body better. Lese answers the question asked in the title. – new123456 Apr 21 '12 at 20:30
@Rishabh: The registry key I mentioned has a list of all previously attached USB devices. That would be how you determine if a pen drive has been used on the system for the first time. – Lèse majesté Apr 22 '12 at 2:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.