At what point in the boot sequence is a usb stick seen?
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:
Code:
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
Comment on bunty_ninja's post
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..