Habib Heydarian's Blog @ Microsoft
Program Manager for Microsoft Robotics, Visual Studio

How to Deploy Windows 8.1/8 from a USB Drive

Habib Heydarian said:
Instructions (using the command line)

At a high level, the steps are:

  1. Mount the Windows 8 [retail] ISO image on your computer
  2. Format a USB flash drive
  3. Copy the Windows 8 files onto the USB flash drive
  4. Make the USB flash drive bootable
  5. Install Windows 8 from the bootable flash drive

Step 1: Mount the Windows 8 [retail] ISO image on your computer

Step 2: Format a USB flash drive

Diskpart Commands
  • Open the command prompt; type the following commands:
    a. diskpart
    b. list disk
  • ^^ This will show all connected disks, their disk numbers, connection status and disk size.
  • Using the sizes, determine which disk is your USB drive and remember its disk number (i.e. Disk 2)
  • 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

Step 3: Make the USB flash drive bootable

We just need to make the USB flash drive bootable before copying the files. To do this, you can use the Boot Sector Registration Tool (bootsect.exe) which is located in the boot folder of the Windows 8 ISO image.

  1. Start a Command Prompt as an Administrator and CHDIR into the boot folder of the Windows 8 ISO image, e.g. I:\boot where I:\ is the drive where the ISO image is mounted
  2. Type bootsect /nt60 k:
    /* where k: is the drive assigned to the USB flash drive */

Step 4: Copy the Windows 8 files onto the USB flash drive

From a command line, use XCOPY to copy the Windows 8 files to the USB flash drive . In the example below, I:\ is the drive where the ISO image is mounted. k:\ is the USB flash drive.
xcopy i:\*.* k:\ /e /f /h

Step 5: Install Windows 8 from the bootable flash drive

How to create a bootable USB flash drive to install Windows 8 Developer Preview - Habib Heydarian's Blog @ Microsoft - Site Home - MSDN Blogs

Commands + Output from the CMD screen - steps 2, 3 and part of 4 (copying of files) - commands are in RED:
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.


Microsoft DiskPart version 6.2.9200

Copyright (C) 1999-2012 Microsoft Corporation.
On computer: OWNER

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          465 GB  1024 KB
  Disk 1    Online          298 GB  1024 KB
  Disk 2    Online           14 GB      0 B

DISKPART> sel dis 2

Disk 2 is now the selected disk.


DiskPart succeeded in cleaning the disk.

DISKPART> cre par pri

DiskPart succeeded in creating the specified partition.

DISKPART> active

DiskPart marked the current partition as active.

DISKPART> format fs=fat32 Quick

  100 percent completed

DiskPart successfully formatted the volume.


Leaving DiskPart...

C:\Windows\system32>cd /d i:\boot

i:\boot>bootsect /nt60 k:
Target volumes will be updated with BOOTMGR compatible bootcode.

K: (\\?\Volume{bb91749f-e659-11e2-bea7-001eec822104})

    Successfully updated FAT32 filesystem bootcode.

Bootcode was successfully updated on all targeted volumes.

i:\boot>xcopy i:\*.* k:\ /e /f /h

I:\autorun.inf -> K:\autorun.inf
I:\bootmgr -> K:\bootmgr
I:\bootmgr.efi -> K:\bootmgr.efi
I:\setup.exe -> K:\setup.exe
I:\boot\bcd -> K:\boot\bcd
I:\boot\boot.sdi -> K:\boot\boot.sdi
I:\boot\bootfix.bin -> K:\boot\bootfix.bin
I:\boot\bootsect.exe -> K:\boot\bootsect.exe
I:\boot\ -> K:\boot\
I:\boot\memtest.exe -> K:\boot\memtest.exe
I:\boot\en-us\bootsect.exe.mui -> K:\boot\en-us\bootsect.exe.mui
I:\boot\fonts\chs_boot.ttf -> K:\boot\fonts\chs_boot.ttf
I:\boot\fonts\cht_boot.ttf -> K:\boot\fonts\cht_boot.ttf
I:\boot\fonts\jpn_boot.ttf -> K:\boot\fonts\jpn_boot.ttf
I:\boot\fonts\kor_boot.ttf -> K:\boot\fonts\kor_boot.ttf
I:\boot\fonts\malgun_boot.ttf -> K:\boot\fonts\malgun_boot.ttf
I:\boot\fonts\malgunn_boot.ttf -> K:\boot\fonts\malgunn_boot.ttf
I:\boot\fonts\meiryo_boot.ttf -> K:\boot\fonts\meiryo_boot.ttf
I:\boot\fonts\meiryon_boot.ttf -> K:\boot\fonts\meiryon_boot.ttf
I:\boot\fonts\msjh_boot.ttf -> K:\boot\fonts\msjh_boot.ttf
I:\boot\fonts\msjhn_boot.ttf -> K:\boot\fonts\msjhn_boot.ttf
I:\boot\fonts\msyh_boot.ttf -> K:\boot\fonts\msyh_boot.ttf
I:\boot\fonts\msyhn_boot.ttf -> K:\boot\fonts\msyhn_boot.ttf
I:\boot\fonts\segmono_boot.ttf -> K:\boot\fonts\segmono_boot.ttf
I:\boot\fonts\segoe_slboot.ttf -> K:\boot\fonts\segoe_slboot.ttf
I:\boot\fonts\segoen_slboot.ttf -> K:\boot\fonts\segoen_slboot.ttf
I:\boot\fonts\wgl4_boot.ttf -> K:\boot\fonts\wgl4_boot.ttf
I:\boot\resources\bootres.dll -> K:\boot\resources\bootres.dll
I:\efi\boot\bootx64.efi -> K:\efi\boot\bootx64.efi
I:\efi\microsoft\boot\bcd -> K:\efi\microsoft\boot\bcd
I:\efi\microsoft\boot\cdboot.efi -> K:\efi\microsoft\boot\cdboot.efi
I:\efi\microsoft\boot\cdboot_noprompt.efi -> K:\efi\microsoft\boot\cdboot_noprom
I:\efi\microsoft\boot\efisys.bin -> K:\efi\microsoft\boot\efisys.bin
I:\efi\microsoft\boot\efisys_noprompt.bin -> K:\efi\microsoft\boot\efisys_noprom
I:\efi\microsoft\boot\memtest.efi -> K:\efi\microsoft\boot\memtest.efi
I:\efi\microsoft\boot\fonts\chs_boot.ttf -> K:\efi\microsoft\boot\fonts\chs_boot
I:\efi\microsoft\boot\fonts\cht_boot.ttf -> K:\efi\microsoft\boot\fonts\cht_boot
I:\efi\microsoft\boot\fonts\jpn_boot.ttf -> K:\efi\microsoft\boot\fonts\jpn_boot
I:\efi\microsoft\boot\fonts\kor_boot.ttf -> K:\efi\microsoft\boot\fonts\kor_boot
I:\efi\microsoft\boot\fonts\malgun_boot.ttf -> K:\efi\microsoft\boot\fonts\malgu
I:\efi\microsoft\boot\fonts\malgunn_boot.ttf -> K:\efi\microsoft\boot\fonts\malg
I:\efi\microsoft\boot\fonts\meiryo_boot.ttf -> K:\efi\microsoft\boot\fonts\meiry
I:\efi\microsoft\boot\fonts\meiryon_boot.ttf -> K:\efi\microsoft\boot\fonts\meir
I:\efi\microsoft\boot\fonts\msjh_boot.ttf -> K:\efi\microsoft\boot\fonts\msjh_bo
I:\efi\microsoft\boot\fonts\msjhn_boot.ttf -> K:\efi\microsoft\boot\fonts\msjhn_
I:\efi\microsoft\boot\fonts\msyh_boot.ttf -> K:\efi\microsoft\boot\fonts\msyh_bo
I:\efi\microsoft\boot\fonts\msyhn_boot.ttf -> K:\efi\microsoft\boot\fonts\msyhn_
I:\efi\microsoft\boot\fonts\segmono_boot.ttf -> K:\efi\microsoft\boot\fonts\segm
I:\efi\microsoft\boot\fonts\segoe_slboot.ttf -> K:\efi\microsoft\boot\fonts\sego
I:\efi\microsoft\boot\fonts\segoen_slboot.ttf -> K:\efi\microsoft\boot\fonts\seg
I:\efi\microsoft\boot\fonts\wgl4_boot.ttf -> K:\efi\microsoft\boot\fonts\wgl4_bo
I:\efi\microsoft\boot\resources\bootres.dll -> K:\efi\microsoft\boot\resources\b
I:\sources\acres.dll -> K:\sources\acres.dll
I:\sources\actionqueue.dll -> K:\sources\actionqueue.dll
I:\sources\adfscomp.dll -> K:\sources\adfscomp.dll
I:\sources\admtv3check.dll -> K:\sources\admtv3check.dll
I:\sources\aeinv.dll -> K:\sources\aeinv.dll

<...> S N I P <...> 

I:\support\logging\en-us\auditetw.dll.mui -> K:\support\logging\en-us\auditetw.d
I:\support\logging\en-us\cmisetupetw.dll.mui -> K:\support\logging\en-us\cmisetu
I:\support\logging\en-us\oobeldretw.dll.mui -> K:\support\logging\en-us\oobeldre
I:\support\logging\en-us\setupcletw.dll.mui -> K:\support\logging\en-us\setupcle
I:\support\logging\en-us\setupetw.dll.mui -> K:\support\logging\en-us\setupetw.d
I:\support\logging\en-us\setupugcetw.dll.mui -> K:\support\logging\en-us\setupug
I:\support\logging\en-us\sysprepetw.dll.mui -> K:\support\logging\en-us\sysprepe
I:\support\logging\en-us\windeployetw.dll.mui -> K:\support\logging\en-us\windep
I:\support\logging\en-us\winsetupetw.dll.mui -> K:\support\logging\en-us\winsetu

2059 File(s) copied


I used UltraISO to mount the Windows 8 ISO -