6

I have multiple Operating systems installed, each with their respective EFI file in the ESP (EFI System Partition).

For example: I have Windows 10 at \EFI\Boot\Microsoft\bootmgr.efi, and I have WinPE at \EFI\WinPE\Boot\bootx64.efi

When I boot into my BIOS I can see the list of operating systems, but I would like to be able to give windows a command to change the order and then shutdown, effectively telling Windows to boot into a different operating system.

ᄂ ᄀ
  • 3,875
  • 1
  • 19
  • 18
Dylan
  • 283
  • 1
  • 2
  • 10

2 Answers2

9

This is not documented anywhere by Microsoft. However I was able to look through the source code of Grub2Win to see how they accomplished switching order.

Aparrently there is a bcdedit object called {fwbootmgr} if you change the display order of that item, it will effectively change the Boot order within the UEFI.

bcdedit /set {fwbootmgr} displayorder <ID_OF_NEW_OS> {bootmgr}

You can get the id of the other UEFI entries by doing: bcdedit /enum {fwbootmgr} and looking at the boot entries under displayorder.

Dylan
  • 283
  • 1
  • 2
  • 10
  • After the `bcdedit /enum {fwbootmgr}` I get a list of 5 ids. I have change the order of the ids as bcedit /displayorder {id2} {id1} {id3} ... – King Midas Jul 15 '22 at 11:11
0

Use bcdedit /displayorder:

bcdedit /displayorder {802d5e32-0784-11da-bd33-000476eba25f} {cbd971bf-b7b8-4885-951a-fa03044f5d71}

bcdedit /enum lists the ids present in the system.

ᄂ ᄀ
  • 3,875
  • 1
  • 19
  • 18
  • Yes, but the ids showed here are invalid, as are different for each system. @Dylan question is better than this one – King Midas Jul 15 '22 at 11:10
  • @KingMidas And what IDs would you expect? The ones from your system nobody is aware of? It's only an example from the official docs. – ᄂ ᄀ Jul 16 '22 at 12:14