NOTE: Do not run these cmds on your computer unless you know what you are doing. These are created specifically for my computer.
DISKPART> list disk
DISKPART> select disk 0
DISKPART> list volume
# find your system partition with fat32 file system. Here to assume it as volume 2. DISKPART> select volume 2
# To assign drive letter.
# If you want to remove drive letter, use remove command. DISKPART> assign letter=b:
# To terminate diskpart command. DISKPART> exit
# Now, you sould move to b:\EFI\Microsoft\Boot\, as windows stores BCD in this folder. cd /d b:\EFI\Microsoft\Boot\
# this is not necessary. ren BCD BCD.bak
# To write a new bootsector on your system partition. bootrec /fixboot
# If your windows running, you should do from here.
# To create BCD store. "/f ALL" is to update BIOS setting including UEFI firmware/NVRAM.
# It might be sense only typing "bcdboot c:\Windows". bcdboot c:\Windows /l en-us /s b: /f ALL
I get an error saying:
Failure when attempting to copy boot files