Boot WinPE from usb-stick using Command Prompt

1

I'm using a usb-stick with WinPE and dism to apply a Win8.1 image (*.wim) to a pc. After applying the image, the pc boots with Win8.1 and a few scripts are executed automatically doing some installation and configuration work.

To save these settings, i want to capture an image of the complete C drive using dism /capture-image (not recimg!). Capturing the image should be done automatically after the execution of the last script, so i need a way to change the boot options from command prompt.

What i have already tried

  • diskpart: flag usb-stick as active volume -> Win8.1 boots

  • bcdedit: bcdedit /copy {current} /d „WinPE“, bcdedit /set {[id]} path F:\EFI\Boot\bootx64.efi, bcdedit /set {[id]} device partition=F:, bcdedit /set {[id]} osdevice partition=F: -> WinPE is showing in boot menu, ut "automatic repair" starts instead of WinPE.

Any ideas what i'm doing wrong or how else i can boot from usb-stick using command prompt?

OverFloo

Posted 2018-03-28T10:38:54.177

Reputation: 11

I'm having the same problem from the answer on my question here: Programmatically restart computer and boot into flash drive - were you able to fix this?

– Grumpy says Reinstate Monica – 2018-05-31T17:04:56.233

No answers