mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Add Logic to catch the disk selection of USB
External drives so that it will not accept a Letter
This commit is contained in:
@@ -2935,7 +2935,14 @@ Function Get-USBDrive {
|
||||
}
|
||||
$inputChoice = Read-Host "Enter the number corresponding to the external hard disk media drive you want to use"
|
||||
$selectedIndex = $inputChoice - 1
|
||||
$USBDrives = $ExternalHardDiskDrives[$selectedIndex]
|
||||
|
||||
if ($selectedIndex -ge 0 -and $selectedIndex -lt $ExternalHardDiskDrives.Count) {
|
||||
$USBDrives = $ExternalHardDiskDrives[$selectedIndex]
|
||||
} else {
|
||||
Write-Error "Invalid selection. Exiting."
|
||||
exit 1
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user