title: change boot order using command line
body: <p>I have Windows installed Surface Pro 6 and I am trying to change the boot order to boot first from USB and not from Windows without getting into the BIOS.</p>
  
  <p>Windows 10 is in C:</p>
  
  <p>Disk on key (WinPE Bootable USB drive) is on E:</p>
  
  <p>How can I switch between them ? I saw something like</p>
  
  <pre><code>bcdedit /createstore bcd
  bcdedit /import bcd
  del bcd
  bcdedit /create {bootmgr}
  bcdedit /set {bootmgr} device boot
  bcdedit /timeout 10
  bcdedit /create /d "USB" /application osloader
  bcdedit /default {&lt;GUID&gt;}
  bcdedit /set {default} device partition=e:
  bcdedit /set {default} path  \Windows\system32\winload.efi
  bcdedit /set {default} osdevice partition=e:
  bcdedit /set {default} systemroot \Windows
  bcdedit /set {default} detecthal yes
  bcdedit /displayorder {default} /addlast
  </code></pre>
  
  <p>but it is not working. I get the message after restart on missing file winload.efi. can someone help ?
  Thanks</p>