I am making a parental control program, that forbids kids to use their computer unles:

1: Their parents type in their password, or...

2: They use their flash drive "key" to open the comuter for a set time frame.

Now, I want to know a few things.

Most importantly, how do I know when the user has inserted the flash drive? My idea: Use a timer to search the computer; if any new drives suddenly show up, search its first directory for the "key" file. Is there a better way to detect the inserting of the drive?

Next, how can I retrieve a file from that drive? Is it just a normal file retrieval, or are there special things I need to do?

And last: I need a secure way to lock the computer, withou using the lock workstation. I was going to use block input... then I realized that they wouldn't be able to type in the parent's passcode. Any ideas?

Thanks!