Although you can create a bootable USB to install Windows 10 using a variety of tools, including with Media Creation Tool and Rufus, it’s also possible to use the Diskpart command line tool to create a flash drive to deploy Windows 10 to any device.
In this guide, you’ll learn the steps to use Command Prompt to create a USB bootable media to install Windows 10.
How to create a USB bootable media to install Windows 10
To create a USB flash drive with the Windows 10 installation files, connect a USB flash drive of at least 4GB of storage, download and mount ISO with the installation files, and then follow these steps:
Search for Command Prompt, right-click the top result and select Run as Administrator.
Type the following command to open Diskpart and press Enter:
Type the following commands and press Enter on each line:
list disk select disk 1 clean create partition primary select partition 1 active format FS=NTFS quickQuick Tip: We’re using the
select disk 1command as an example, but you have to replace 1 with the number of the flash drive you want to use. Also, if you’re creating a bootable media for a device that uses UEFI, you’ll need to format the drive using FAT32, instead of NTFS with this command:
format fs=FAT32 quick.
Type the following command to assign a volume and a drive letter for the USB flash drive and press Enter:
In the command, change X for any available letter you want to use.
Type the following command to quit the tool and press Enter:
Type the following command to get into the boot folder located in the root of the Windows 10 ISO and press Enter:
g: cd boot
In the command, change G for the letter of your mount drive as it appears in File Explorer.
Type the following command to update the volume boot code and press Enter:
bootsect /nt60 X:
Type the following command to copy all the Windows 10 files to the USB flash drive and press Enter:
xcopy G:\*.* X:\ /E /F /H
In the command, change the G and X drive letters with the correct drive letters for the Windows 10 ISO image and the USB flash drive respectively.
Once you’ve completed the steps, you can use the bootable flash drive to install Windows 10 on computers using BIOS or UEFI.
If you’re having issues creating a USB bootable media, you can submit your questions in the Pureinfotech forums.