Write-Host "Chipset drivers have finished installing."
Write-Host "Would you like to search for your motherboard's driver page to download any additional drivers?"
$key = Read-Host "[Y] Yes, search for motherboard page [N] No, continue"
while (-not $validInput) {
switch ($key.ToUpper()) {
'Y' {
$validInput = $true
$searchUrl = "https://duckduckgo.com/?q=motherboard+drivers+for+$($fullMotherboardName -replace ' ', '+')"
Read-Host
Start-Process $searchUrl
}
'N' {
$validInput = $true
}
default {
$validInput = $false
Write-Host "Invalid input. Please try again"
}
}
}
Y and N do the same thing and "default" / invalid input loops forever
This code was about 50% ai generated so i didn't really expect it to work great/at all