PDA

View Full Version : At what point in the boot sequence is a usb stick seen?


jgp833
Feb 3, 2011, 02:40 PM
I've got an application that's being started when Windows starts, and when it comes up, it needs to look for a folder on any USB stick that might have been plugged in before the computer was powered up... So, at what point in the boot sequence is a usb stick seen? I need to be sure that, IF a USB stick is present, I know it, and can copy the folder before continuing...
This code is near the top of my app:


If My.Computer.FileSystem.DirectoryExists("D:\audio") Then
My.Computer.FileSystem.CopyDirectory("D:\audio", "c:\audio", True)
End If
If My.Computer.FileSystem.DirectoryExists("E:\audio") Then
My.Computer.FileSystem.CopyDirectory("E:\audio", "c:\audio", True)
End If
If My.Computer.FileSystem.DirectoryExists("F:\audio") Then
My.Computer.FileSystem.CopyDirectory("F:\audio", "c:\audio", True)
End If
If My.Computer.FileSystem.DirectoryExists("G:\audio") Then
My.Computer.FileSystem.CopyDirectory("G:\audio", "c:\audio", True)
End If
If My.Computer.FileSystem.DirectoryExists("H:\audio") Then
My.Computer.FileSystem.CopyDirectory("H:\audio", "c:\audio", True)
End If


Is it possible that I get past this code before the USB stick is seen, and given a drive letter?

Thanks for any help you can offer!

Joe

bunty_ninja
Feb 5, 2011, 12:05 AM
USB will be seenbeforeyour Operating system starts..
So...

jgp833
Feb 7, 2011, 09:57 AM
Thanks! Well... wonder what might be going on here? The reported behavior is that sometimes the folder on the stick is not copied to the C-drive... Haven't been able to duplicate this behavior myself, but..

bunty_ninja
Feb 8, 2011, 02:13 PM
Check security on folder and permissions for the user logged on