From:

TN-logo.png


How to Deploy Windows 7 from a USB Drive

Diskpart Commands

This process will prepare the USB drive for the Windows 7 disk files. The normal Windows GUI format tool will not suffice, as this does not use the active option to make the drive bootable.

Please note: This will delete all data on the drive, so ensure all files are backed up before continuing.
  1. Open the command prompt
  2. Type: diskpart
  3. Type: list disk
  4. This will show all connected disks, their disk numbers, connection status and disk size
  5. Using the sizes, determine which disk is your USB drive and remember its disk number (i.e. Disk 2)
  6. Type the following commands: (where X is the disk number of your USB drive)
a. sel dis X
b. clean
c. cre par pri
d. active
e. format fs=fat32 Quick
f. exit

Once the disk is formatted and prepared, you can copy the Windows 7 installation files onto the disk, whether this is from the DVD, ISO or a modified image.
How to Deploy Windows 7 from a USB Drive - TechNet Articles - United States (English) - TechNet Wiki

The Tutorial for Windows 8 is the same & contains detailed CMD info + screenshots

https://www.sysnative.com/forums/windows-8-|-windows-rt-tutorials/6223-install-windows-8-usb-stick.html