Setup Windows 8 on USB With The CMD

No matter which way you pick from below, you need to prepare a Windows 8 installation ISO image file or Windows 8 CD/DVD as well as an at least 4 GB (for 32-bit system) or 8 GB (for 64-bit system) USB flash drive.

Way 1. Create a Windows 8 Bootable USB Using Command Prompt

  1. Mount Windows 8 image. If the Windows 8 installation image you have is an ISO file, you have to mount it on your computer. Just right-click on it and choose Mount. If the system image is on a CD/DVD, leave it as it is.

Tips: If there is no Mount option after right-click the ISO image, it means that the operating system of your computer does not have the capability to mount an ISO. Then, you have to use a third party ISO image software to do it.

  1. Format USB. Insert target USB flash drive into your computer and open Command Prompt. Then, input the following command orders one by one and each with Pressing Enter.

Diskpart (open disk partition command tool)
List disk (show all the disks connected to this machine)
Select disk # (# is the USB disk number)
Clean (clean up all files on the USB; if there are crucial data you’d like to keep, please move or back them out to another device before cleaning)
Create partition primary (create a primary partition on the USB drive for saving Windows 8 system files)
Select partition 1 (select the primary partition you just created; actually, there is only the primary partition on USB flash drive at this situation; this command is optional)
Format fs=ntfs quick (quickly format the selected partition into NTFS file system; if you do not want it be a quick format, just omit “quick”)
Active (active the selected partition; this command is optional)
Exit (exit diskpart)

  1. Make external USB bootable . Continue to key in the following commands:
  • E:\boot bootsect /nt60 q:

“E” is Windows 8 disk drive letter, whether it is a mounted ISO file or CD/DVD; “q” is your external USB drive letter; “E:\boot bootsect /nt60 q:” means to change Windows 8 mount disk as the first boot device and make external USB bootable.

  1. Copy Windows 8 ISO to USB . Use XCOPY to copy the Windows 8 system files to target USB:
  • E:\xcopy e:*. /s/h/f q:*