tags:

views:

23

answers:

1

I want to check if any file,folder or window is openend from the removable media like USB and close it.

A: 

I don't know about with C++, but there are ways with AutoIt to do that easily. Basically you can loop through running processes and get the path for those processes, parse the path for the drive and check for drive type. If it is "removable", kill the process. It would actually be a rather simple script.

http://www.autoitscript.com/autoit3/docs/

MaQleod