Now you'll be back in the command prompt, enter the following commands:
cd /d Z:\EFI\Microsoft\Boot - Goes to the "Boot" directory in the Z: partition
attrib Z:\EFI\Microsoft\Boot\BCD -h -r -s - Removes the hidden, read-only and system attributes from the BCD folder
ren Z:\EFI\Microsoft\Boot\BCD BCD.old - Renamed the BCD folder to BCD.old
bootrec /rebuildbcd - This command will rebuild the BCD.
When it asks you Add the installation to boot list?, press on y followed by Enter and if it succeed, you'll have a The operation completed successfully message. Once you're done, close the command prompt, restart your computer and try to upgrade again.