Creating a bootable USB drive in Windows provides portable installation and recovery media for operating systems, firmware updates, and troubleshooting environments. USB-based boot media is typically faster than optical discs and remains a common requirement for reinstalling Windows or running repair tools on modern systems.

A bootable USB works by presenting a readable partition and file system that the firmware can load from at startup. For Windows installation media, the ISO contains both legacy boot components (for BIOS) and UEFI boot files under the \efi directory, and copying the ISO contents onto a correctly formatted USB volume makes those boot files available to the firmware.

The DiskPart clean command permanently removes partitions from the selected disk, so selecting the correct disk number is critical. FAT32 is widely compatible for UEFI boot, but it cannot store a single file larger than 4 GB, which affects some Windows ISOs that include install.wim; splitting the image into multiple .swm files avoids that limitation while keeping the USB FAT32.

Steps to create a bootable USB in Windows:

  1. Insert the USB drive.

    Use a USB drive with at least 8 GB capacity, and remove any files that must be kept elsewhere.

  2. Open Command Prompt as Administrator.

    DiskPart requires elevated privileges to modify disks and partitions.

  3. Start DiskPart.
    C:\Windows\System32> diskpart
    
    Microsoft DiskPart version 10.0.22621.1
    
    Copyright (C) Microsoft Corporation.
    On computer: DESKTOP-EXAMPLE
  4. List the connected disks.
    DISKPART> list disk
    
      Disk ###  Status         Size     Free     Dyn  Gpt
      --------  -------------  -------  -------  ---  ---
      Disk 0    Online          465 GB      0 B
      Disk 1    Online           14 GB   1024 KB

    Match the USB drive by Size, and avoid selecting the internal system disk.

  5. Select the USB disk.
    DISKPART> select disk 1
    
    Disk 1 is now the selected disk.
  6. Confirm the selected disk details.
    DISKPART> detail disk
    
    Generic USB Flash Disk
    Disk ID: 12345678
    Type   : USB
    Status : Online
    Path   : 0
    Target : 0
    LUN ID : 0
    
    There are no volumes.

    The Type field commonly shows USB for removable flash drives.

  7. Remove all partition information from the selected disk.
    DISKPART> clean
    
    DiskPart succeeded in cleaning the disk.

    The selected disk is erased by clean, including all partitions and data.

  8. Convert the disk to MBR partition style.
    DISKPART> convert mbr
    
    DiskPart successfully converted the selected disk to MBR format.

    MBR boot media is broadly compatible across UEFI and legacy BIOS systems for removable USB drives.

  9. Create a primary partition.
    DISKPART> create partition primary
    
    DiskPart succeeded in creating the specified partition.
  10. Select the new partition.
    DISKPART> select partition 1
    
    Partition 1 is now the selected partition.
  11. Mark the partition as active for legacy BIOS boot.
    DISKPART> active
    
    DiskPart marked the current partition as active.

    UEFI boot does not use the active flag, but setting it does not prevent UEFI boot on typical systems.

  12. Format the partition as FAT32.
    DISKPART> format fs=fat32 quick label=BOOTUSB
    
      100 percent completed
    DiskPart successfully formatted the volume.

    FAT32 cannot store a single file larger than 4 GB, which can affect sources\install.wim on some Windows ISOs.

  13. Assign a drive letter to the USB volume.
    DISKPART> assign letter=U
    
    DiskPart successfully assigned the drive letter or mount point.
  14. Exit DiskPart.
    DISKPART> exit
    
    Leaving DiskPart...
  15. Mount the ISO file.
    C:\Windows\System32> PowerShell -NoProfile -Command "Mount-DiskImage -ImagePath 'C:\ISO\windows.iso'"

    The mounted ISO appears as a new drive letter (for example E:).

  16. Copy the ISO contents to the USB drive.
    C:\Windows\System32> robocopy E:\ U:\ /e /xf install.wim
    
    -------------------------------------------------------------------------------
       ROBOCOPY     ::     Robust File Copy for Windows
    -------------------------------------------------------------------------------
    
      Started : Monday, December 22, 2025 14:12:03
       Source : E:\
         Dest : U:\
    
        Files : *.*
      Excluded Files : install.wim
    
    ##### snipped #####
    
    -------------------------------------------------------------------------------
                   Total    Copied   Skipped  Mismatch    FAILED    Extras
        Dirs :        57        57         0         0         0         0
       Files :      1234      1234         0         0         0         0
       Bytes :   4.15 g   4.15 g         0         0         0         0
    
       Ended : Monday, December 22, 2025 14:14:14

    Excluding install.wim keeps the copy compatible with FAT32 when the ISO contains a 4 GB+ WIM.

  17. Split install.wim onto the USB drive when the ISO contains it.
    C:\Windows\System32> dism /Split-Image /ImageFile:E:\sources\install.wim /SWMFile:U:\sources\install.swm /FileSize:3800
    
    Deployment Image Servicing and Management tool
    Version: 10.0.22621.1
    
    Splitting image
    [==========================100.0%==========================]
    The operation completed successfully.

    Skip this step when the ISO uses install.esd instead of install.wim.

  18. Verify the UEFI bootloader exists on the USB drive.
    C:\Windows\System32> dir U:\efi\boot\bootx64.efi
    
     Volume in drive U is BOOTUSB
     Volume Serial Number is 12AB-34CD
    
     Directory of U:\efi\boot
    
    12/22/2025  02:05 PM         1,193,024 bootx64.efi
                   1 File(s)      1,193,024 bytes
  19. Verify the installation image exists under sources.
    C:\Windows\System32> dir U:\sources\install*.*
    
     Volume in drive U is BOOTUSB
     Volume Serial Number is 12AB-34CD
    
     Directory of U:\sources
    
    12/22/2025  02:06 PM     3,980,000,000 install.swm
    12/22/2025  02:07 PM     3,980,000,000 install2.swm
    12/22/2025  02:07 PM     1,224,567,890 install3.swm
                   3 File(s)  9,184,567,890 bytes
  20. Dismount the ISO file.
    C:\Windows\System32> PowerShell -NoProfile -Command "Dismount-DiskImage -ImagePath 'C:\ISO\windows.iso'"
  21. Safely eject the USB drive.