New
#11
That's all well and good, but is there a way to do it via a Batch or Powershell script?
I'm just looking for the knowledge.
Hmmm, seems like bcdedit /default <ID> would do it, so if
Then I could used bcdedit /derfault {bootmgr} or bcdedit /default {current} to switch between them from a batch file, right?Code:C:\Users\ztruk>bcdedit /enum Windows Boot Manager -------------------- identifier {bootmgr} device partition=\Device\HarddiskVolume1 path \EFI\Microsoft\Boot\bootmgfw.efi description Windows Boot Manager locale en-US inherit {globalsettings} default {current} resumeobject {8d90a8be-d39b-11ea-982c-97b4c3117002} displayorder {current} toolsdisplayorder {memdiag} timeout 10 Windows Boot Loader ------------------- identifier {current} device partition=C: path \WINDOWS\system32\winload.efi description Windows 10 locale en-US inherit {bootloadersettings} recoverysequence {8d90a8c1-d39b-11ea-982c-97b4c3117002} displaymessageoverride Recovery recoveryenabled Yes isolatedcontext Yes allowedinmemorysettings 0x15000075 osdevice partition=C: systemroot \WINDOWS resumeobject {8d90a8be-d39b-11ea-982c-97b4c3117002} nx OptIn bootmenupolicy Standard hypervisorlaunchtype Auto
By parsing the /enum output you could see which is currently Default and switch if that's what you want or you could accept a parameter to control who you switch to.
Probably even easier in Powershell.