Topic: BCDedit.exe won't run  (Read 93 times)

BCDedit.exe won't run
« on: September 16, 2020, 07:49:16 AM »

respect88

  • Apprentice
  • *
  • Date Registered: Feb 2020
  • Posts: 7
I have tried running bcdedit.exe in Windows PE SE and also vanilla WinPE and I get the below error. I am not sure what I am doing wrong.


Re: BCDedit.exe won't run
« Reply #1 on: September 16, 2020, 08:48:54 AM »

gbrao

  • Chef
  • ***
  • Date Registered: Sep 2011
  • Posts: 258
What BCD are you trying to edit ?

You may need to specify it e.g. :
Code: [Select]
SET "_STORE=%SystemDrive%\boot\bcd"
bcdedit.exe /store "%_STORE%"...

Re: BCDedit.exe won't run
« Reply #2 on: September 17, 2020, 04:40:35 AM »

respect88

  • Apprentice
  • *
  • Date Registered: Feb 2020
  • Posts: 7
I guess what I want to do is edit the EFI boot order from WinPE, without having Windows installed on the machine at all. Linux has a tool called efibootmgr.

Re: BCDedit.exe won't run
« Reply #3 on: November 01, 2020, 05:58:02 AM »

ErikW

  • Jr. Chef
  • **
  • Date Registered: Mar 2017
  • Posts: 19
You can edit the BCD file on another computer by copying it to the machine where you want to edit it.  Note that BCDEDIT has a 32-bit and 64-bit version and is also version sensitive, so you can't run the BCDEDIT from a different version of Windows, but Windows 7 and Windows 10 can edit each other's BCD's with a few caveats.  The unrecognized settings, if any will display a UUID instead of a name for the setting.  32-bit versus 64-bit and EFI versus BIOS doesn't matter if the Windows version is the same.

Also, BCD files are ordinary registry hives.  You can load them in regedit.  But, regedit doesn't translate all those UUID's into parameter names and values.

I use the /store option a lot, and I sometimes define a command alias or batch file so that I don't have to keep typing it.  Take full advantage of the copy and paste in the command window.  You can drag the mouse cursor and right click to easily copy text like UUIDs.  Right click with nothing selected to paste into the command line you are typing.  You can still drag file names into commands by dragging the file or directory path from explorer.  You can't drag executable files to run commands anymore.

You can use "boot" for a device instead of "partition=X:" if you want to make a generic BCD that works for all files located on the same partition with bootmgr.  That cuts down on the editing.  Also, remember that you can copy an entry to create a new one that is similar.

 

Powered by EzPortal