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
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