Not sure if this is a Windows or a VB question.
I need to write a VB program that detects when a certain USB drive is inserted into any USB port. The device will have a certain Volume Label or serial number. Once detected, this VB program open some text files on the USB drive and extract some test data. It will then close the files and make the USB device ready "Safely Be Removed" (whatever that really means ).
1) AutoDetecting when Device Is inserted and Running a VB Program. Windows seems to be able to detect when a USB device is inserted, it gives you the option of either selecting something to do or selecting a program to run. I thought that I could have my program show up in this list and then automatically be executed
2) Once the data is pulled off the drive, In VB, how do you prepare the device to be "Safely Removed"
Any suggestions Thanks.![]()

How to automatically run a program on the PC when a USB drive is inserted.
rumen101010