Click here to Skip to main content
15,896,154 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi guys,
I want you to help me to solve a problem.
I'd like, via a batch file or c++ program, to copy everything from a usb pen into the hdd, just when I insert the usb pen. Basically when the pc is turned on the sw starts and it waits until a usb pen is inserted and then the sw copies everything from the usb pen into the hdd.
I don't want to use autorun.inf file.
I found in msdn microsoft help the command WM_DEVICECHANGE but i don't know how to use it.
Thanks to eveyone, Nicola
Posted
Updated 25-Nov-13 4:30am
v2
Comments
Sergey Alexandrovich Kryukov 25-Nov-13 10:26am    
1) Why do you want such a potentially dangerous thing?
2) Why don't you want to use such a basic thing as autorun.inf?
3) Why won't you just read MSDN on WM_DEVICE change and find some code samples?

Please, don't be surprised: each time you are going to have some unusual requirements, expect questions "why?". Not many people like wasting time on something which might make little or no sense.

—SA

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