"Unable to obtain exclusive access" when switching AWAY from read-only BCD

#1
After loading a BCD from a read-only source (optical drive), and then trying to switch to different BCD, I get the error in the attached screenshot.
It apparently copies the BCD to a temp directory - so not sure why exclusive access can't be obtained.. but i'll let you figure that one out

If I try to 'Load System BCD' - i get the error, click cancel, and the selected BCD does not change (does not load system BCD).

If I try to 'Select BCD Store' - i get the error once, click cancel, and the selected BCD store loads properly.
 

Attachments

mqudsi

Mostly Harmless
Staff member
#2
Hmm. Sounds like I may be displaying the wrong path in the message box, it's possible that I failed to get exclusive access to the physical path, but I'm showing the temp path here..

I'll have to review the code and get back to you on this one. Thanks for taking the time to report this, it's much appreciated!
 

mqudsi

Mostly Harmless
Staff member
#4
Hi,

My last post is correct - here's what happened:

You loaded a BCD store from an external device. To boost performance, EasyBCD copies this to a local temp file, makes all the modifications here, then on shutdown of EasyBCD or on loading of a different store, it copies the file back to the removable device.

But you loaded it from an optical drive! So when you tried loading the *new* store, it tried saving the *old* one from an optical drive and, as such, gave the error.

Obviously in this case the error message should show the optical drive path and not the temp location, which is most definitely a bug.

I guess I need to add a read-only check to EasyBCD when a store is *loaded* instead of being saved, and then just read but don't ever even try to write the changes back.
 
#5
Or just clarify the error message? It seem pretty valid. Regardless, thanks for the info.

Of concern also is that the 'system BCD' cannot be selected when trying to switch away from a RO BCD... after hitting 'cancel' to that error message, EBCD never switches to the system BCD.
 

mqudsi

Mostly Harmless
Staff member
#6
Nice catch. Definitely need to keep that in mind.
 

mqudsi

Mostly Harmless
Staff member
#7
Actually, if you press Cancel instead of Retry the new BCD should be loaded?
 

mqudsi

Mostly Harmless
Staff member
#9
Aha. Ok, that makes more sense.