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:
- Mount the Windows 8 [retail] ISO image on your computer
- Format a USB flash drive
- Copy the Windows 8 files onto the USB flash drive
- Make the USB flash drive bootable
- Install Windows 8/8.1/10 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. select disk Xb. clean c. create partition primary 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.
- 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
- Type bootsect /nt60 k:
/* where k: is the drive assigned to the USB flash drive */
Result in CMD screen:
CMD Screen said:Target volumes will be updated with BOOTMGR compatible bootcode.
I: (\\?\Volume{b64ba95d-68fc-11e5-82a9-a01d48c2bd4c})
Successfully updated FAT32 filesystem bootcode.
Bootcode was successfully updated on all targeted volumes.
*** NOTE: the volume number on line 2 will be different than yours,
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.
Code:xcopy i:\*.* k:\ /e /f /h
Step 5: Install Windows 8/8.1/10 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:
Rich (BB code):
Microsoft Windows [Version 6.2.9200]
(c) 2012 Microsoft Corporation. All rights reserved.
C:\Windows\system32>diskpart
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> clean
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.
DISKPART> exit
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\etfsboot.com -> K:\boot\etfsboot.com
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
pt.efi
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
pt.bin
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
.ttf
I:\efi\microsoft\boot\fonts\cht_boot.ttf -> K:\efi\microsoft\boot\fonts\cht_boot
.ttf
I:\efi\microsoft\boot\fonts\jpn_boot.ttf -> K:\efi\microsoft\boot\fonts\jpn_boot
.ttf
I:\efi\microsoft\boot\fonts\kor_boot.ttf -> K:\efi\microsoft\boot\fonts\kor_boot
.ttf
I:\efi\microsoft\boot\fonts\malgun_boot.ttf -> K:\efi\microsoft\boot\fonts\malgu
n_boot.ttf
I:\efi\microsoft\boot\fonts\malgunn_boot.ttf -> K:\efi\microsoft\boot\fonts\malg
unn_boot.ttf
I:\efi\microsoft\boot\fonts\meiryo_boot.ttf -> K:\efi\microsoft\boot\fonts\meiry
o_boot.ttf
I:\efi\microsoft\boot\fonts\meiryon_boot.ttf -> K:\efi\microsoft\boot\fonts\meir
yon_boot.ttf
I:\efi\microsoft\boot\fonts\msjh_boot.ttf -> K:\efi\microsoft\boot\fonts\msjh_bo
ot.ttf
I:\efi\microsoft\boot\fonts\msjhn_boot.ttf -> K:\efi\microsoft\boot\fonts\msjhn_
boot.ttf
I:\efi\microsoft\boot\fonts\msyh_boot.ttf -> K:\efi\microsoft\boot\fonts\msyh_bo
ot.ttf
I:\efi\microsoft\boot\fonts\msyhn_boot.ttf -> K:\efi\microsoft\boot\fonts\msyhn_
boot.ttf
I:\efi\microsoft\boot\fonts\segmono_boot.ttf -> K:\efi\microsoft\boot\fonts\segm
ono_boot.ttf
I:\efi\microsoft\boot\fonts\segoe_slboot.ttf -> K:\efi\microsoft\boot\fonts\sego
e_slboot.ttf
I:\efi\microsoft\boot\fonts\segoen_slboot.ttf -> K:\efi\microsoft\boot\fonts\seg
oen_slboot.ttf
I:\efi\microsoft\boot\fonts\wgl4_boot.ttf -> K:\efi\microsoft\boot\fonts\wgl4_bo
ot.ttf
I:\efi\microsoft\boot\resources\bootres.dll -> K:\efi\microsoft\boot\resources\b
ootres.dll
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
ll.mui
I:\support\logging\en-us\cmisetupetw.dll.mui -> K:\support\logging\en-us\cmisetu
petw.dll.mui
I:\support\logging\en-us\oobeldretw.dll.mui -> K:\support\logging\en-us\oobeldre
tw.dll.mui
I:\support\logging\en-us\setupcletw.dll.mui -> K:\support\logging\en-us\setupcle
tw.dll.mui
I:\support\logging\en-us\setupetw.dll.mui -> K:\support\logging\en-us\setupetw.d
ll.mui
I:\support\logging\en-us\setupugcetw.dll.mui -> K:\support\logging\en-us\setupug
cetw.dll.mui
I:\support\logging\en-us\sysprepetw.dll.mui -> K:\support\logging\en-us\sysprepe
tw.dll.mui
I:\support\logging\en-us\windeployetw.dll.mui -> K:\support\logging\en-us\windep
loyetw.dll.mui
I:\support\logging\en-us\winsetupetw.dll.mui -> K:\support\logging\en-us\winsetu
petw.dll.mui
2059 File(s) copied
i:\boot>
I used UltraISO to mount the Windows 8 ISO - http://www.ezbsystems.com/ultraiso/download.htm
In Windows 10, just double-click on the ISO in Windows Explorer.
Last edited: