If you, like me, tried to deploy Windows8 (maybe for 7 is the same) using a wim image and then used the command
and you got the message "failure when attempting to copy boot files" probably you are in the situation I was.
I tried to solve using this command:
bcdboot c:\windows /s s:
(where S: is the small system partition) and apparently with success, but after rebooting the machine you got:
An operating system wasn't found. Try disconnecting any drives that don't contain any operating system.
after many unsuccesful test and many investigation, I arrived to the conclusion the issue is related to the UEFI support of the machine (also if when starting, it appears to be a normal BIOS)
so I solved the issue with the command :
bcdboot c:\windows /s s: /f ALL
that ALL means copy both the BIOS and UEFI files to the disk
Remember S is the system partition, not the partition containing windows files