Trying to understand BCD

Cynical

Member
This isn't exactly a question about EasyBCD, because EasyBCD works :smile:

I'm trying to understand BCD, because I'm coming from old-school XP (I understand boot.ini). I read up on this new BCD that's in Vista and Win7, and I thought I'd poke about a little to understand it better (please don't shudder in horror).

I found documentation on MSDN about a WMI interface to BCD, and tried to access it in a number of ways (using WBEMTest and WMI Object Browser, for example). This was the strange part: both of these could be pointed at the root\wmi namespace, and both "admitted" that there were some BCD object classes present (WMI Object Browser saw more classes than WBEMTest), but both denied the existence of any BCD object instances. Made me wonder/worry if the system was broken in some way.

I installed EasyBCD, and it had no trouble at all displaying the boot configuration. That's reassuring!

So now I'm curious. Does EasyBCD use the WMI interface to BCD? Or does it go directly to the registry hive that holds the BCD? Or shouldn't I ask? :grinning:
 
Hi Cynical,

Welcome to NeoSmart Technologies. Don't feel bad about asking questions - curiosity is good!

EasyBCD uses neither of those techniques. When I first started out, I tried pretty much everything, and the only solution that I found to be reliable regardless of the OS (even on XP) is using bcdedit.exe from the commandline and parsing the output.
 
OK, that wasn't expected :smile:

I shall have to explore BCDEdit further. I had a little play, but was not impressed - it looked like a quick hack that someone threw together.

All the Microsoft documentation says one is supposed to use the WMI interface. Sadly, the documentation is not very detailed, and I hit some strange behaviours. I thought I was just misunderstanding things. Since then I have been reading some of the threads in this forum, and sounds like there might be a bug or two in Microsoft's code.

Unsurprisingly, all the non-Microsoft documentation I have found says one should use EasyBCD :smile:

As an inveterate explorer, I may try writing some C++ to access the WMI interface, but I can't say I wasn't warned.
 
The WMI isn't available if you're on Windows XP but have the Vista bootloader installed, which ruled it out of the question for us.

There are a lot of hacks in EasyBCD to pull off tricks and features not supported in BCDEDIT.exe. While EasyBCD started off as a GUI for bcdedit, it now has its own bootloader used internally for many features (NeoGrub), plus a number of hat tricks it does with the BCD to make certain things possible.

Another reason we don't use the WMI even on Vista is that with some of the tricks EasyBCD does, it's faster to go through bcdedit than to access the WMI, which has (and as far as we're concerned, forever will be) ridiculously slow.
 
I'd heard the WMI is slow. It does seem awfully heavyweight to use an SQL interface over something that's stored in a registry hive. Especially seeing that there's already a perfectly good registry interface :smile:

Good point about not having the WMI API under XP, too.

Thank you for clearing that up.
 
Back
Top