its another two years later, but I recently did something similar, and I think this might also work for your case.
Instead of looking towards the Windows Boot Manger, or even the Firmware Boot Manager, instead we modify the EFI directly, to indirectly modify the BIOS Boot Order, without actually having to modify the BIOS.
Basically, I have a Windows and a Linux(Ubuntu) Partition on separate drives, with separate Bootloaders on each drive. They can either use separate EFI Partitions, or even share the same EFI Partition.
What the BIOS does on boot in simple terms is it looks for EFI Partition on all drives, and then for .EFI files on these partitions, and generates the boot entries from any Bootloaders it finds. These can be either one per EFI partition or several. Usually they will be installed in separate folders.
What I did was write a script, that would rename all the .EFI files of the currently active OS to a different File extension (like .BAK), and vice versa for the other OS that I want to boot to. This causes the BIOS to discover only the Boot Manager of the other OS upon reboot and boot to that, as if it was the only drive in the system. To return to the original OS, you have a second script on the other OS that does the same thing in reverse.
On Linux, you can modify the current EFI partition directly at /boot/efi (if you are root), and if you have a second EFI partition, you can mount it manually just like any fat32 partition.
On Windows, you can programmatically mount EFI partitions by using diskpart scripts.
The below example scripts use a shared EFI partition, but it should work just as well with two EFI partitions, you would just have to mount both of them.
Example batch script to switch from Windows to Ubuntu:
@echo off
echo Mounting EFI Partition...
diskpart /s C:\Users\permissionBRICK\source\script\diskpart_boot_linux.txt
echo Enabling Linux Bootmgr...
move M:\EFI\ubuntu\grubx64.bak M:\EFI\ubuntu\grubx64.efi
move M:\EFI\ubuntu\mmx64.bak M:\EFI\ubuntu\mmx64.efi
move M:\EFI\ubuntu\shimx64.bak M:\EFI\ubuntu\shimx64.efi
echo Disabling Windows Bootmgr...
move M:\EFI\Microsoft\Boot\memtest.efi M:\EFI\Microsoft\Boot\memtest.bak
move M:\EFI\Microsoft\Boot\bootmgfw.efi M:\EFI\Microsoft\Boot\bootmgfw.bak
move M:\EFI\Microsoft\Boot\bootmgr.efi M:\EFI\Microsoft\Boot\bootmgr.bak
echo Unmounting EFI Partition...
diskpart /s C:\Users\permissionBRICK\source\script\diskpart_boot_linux_done.txt
echo Done. Rebooting in 10 sec.
shutdown -r -t 1
Example diskpart_boot_linux.txt:
sel disk 2
sel part 1
assign letter=M
Example diskpart_boot_linux_done.txt:
sel disk 2
sel part 1
remove
Find out the Disk and Partition numbers by running diskpart in console and using list disk and list part
Beware that these may change if you add more drives to the system.
Example bash script to boot from Ubuntu into Windows:
sudo mv /boot/efi/EFI/Microsoft/memtest.bak /boot/efi/EFI/Microsoft/memtest.efi
sudo mv /boot/efi/EFI/Microsoft/bootmgfw.bak /boot/efi/EFI/Microsoft/bootmgfw.efi
sudo mv /boot/efi/EFI/Microsoft/bootmgr.bak /boot/efi/EFI/Microsoft/bootmgr.efi
sudo mv /boot/efi/EFI/ubuntu/grubx64.EFI /boot/efi/EFI/ubuntu/grubx64.bak
sudo mv /boot/efi/EFI/ubuntu/mmx64.EFI /boot/efi/EFI/ubuntu/mmx64.bak
sudo mv /boot/efi/EFI/ubuntu/shimx64.EFI /boot/efi/EFI/ubuntu/shimx64.bak
sudo reboot
The downside of this method is that unless you use the scripts, you will only ever to be able to boot to the current OS, unless you run system repair, not even via BIOS Manual Boot device select.
Also, this will only work if you have no other Boot devices in your Boot order like Network Boot etc, since some BIOSes will shuffle around the boot order every time you run the script since it is technically a new Boot Option every time, so to have it work seamlessly, make sure the two boot drives are the only available Boot Options in the Boot order, so the currently selected OS will always be the only Boot Option available.
The upside of using this, is that it even works with SecureBoot and BitLocker enabled, you don't even need to pause BitLocker to set up the dual boot, as long as the first boot device is Windows Boot Manager, the TPM is happy, and if you boot Linux, Bitlocker is not active anyway.