Set Boot Manager entry timeout to 0

Fixes #2562
This commit is contained in:
CodingWonders 2024-11-22 18:24:00 +01:00
parent 39ee4d53c0
commit a45402e9d8

View File

@ -63,6 +63,22 @@ function Microwin-NewFirstRun {
{
}
# Get BCD entries and set bootmgr timeout accordingly
try
{
# Check if the number of occurrences of "path" is 2 - this fixes the Boot Manager screen issue (#2562)
if ((bcdedit | Select-String "path").Count -eq 2)
{
# Set bootmgr timeout to 0
bcdedit /set `{bootmgr`} timeout 0
}
}
catch
{
}
'@
$firstRun | Out-File -FilePath "$env:temp\FirstStartup.ps1" -Force
}