I'd suggest to use
DriveInfo Class (System.IO)[
^]
How to get list of removable drives?
Dim RemoveableDrives = DriveInfo.GetDrives().Where(Function(x) x.DriveType=DriveType.Removable).ToList()
For Each d As DriveInfo In RemoveableDrives
Console.WriteLine(" Drive name: {0} type: {1}", d.Name, d.DriveType)
If d.IsReady = True Then
Console.WriteLine(" Volume label: {0}", d.VolumeLabel)
Console.WriteLine(" File system: {0}", d.DriveFormat)
Console.WriteLine(" Available space to current user:{0, 15} bytes", d.AvailableFreeSpace)
Console.WriteLine(" Total available space: {0, 15} bytes", d.TotalFreeSpace)
Console.WriteLine(" Total size of drive: {0, 15} bytes ", d.TotalSize)
End If
Next
Now, you have to check if drive of
Application.StartupPath Property (System.Windows.Forms)[
^] is a removable drive.