Want to install Windows from a USB drive instead of a DVD?
Yes, and you don't need any extra software. Command Prompt and a USB drive are enough.
This was one of the very first tricks I wrote on this site, back in 2015. Since then, Windows 11 arrived, its setup file got bigger than a USB stick can normally hold, and USB drives got bigger than diskpart likes.
Here, I'll cover what you need, the five steps, and the errors you're most likely to hit. The main commands haven't changed.
Also Read: How to Repair a Corrupted Memory Card or USB Pendrive
TL;DR
- What you need: a USB drive of 8 GB or more, the Windows 11 ISO and a Windows PC with an administrator account.
- How it works: diskpart prepares the drive, robocopy copies the files and DISM splits install.wim so it fits on FAT32.
- Windows 10: the same steps work with a Windows 10 ISO.
- Erases the drive: everything on the USB is deleted, so check the disk number before you type the commands.
- Easier option: Media Creation Tool or Rufus, if you'd rather not use the command line.
What Is a Bootable USB?
A bootable USB is a USB drive that holds Windows setup files. A PC can start from it and install Windows.
Why Make a Bootable USB?
Most laptops don't have a CD/DVD drive anymore. Even if yours does, installing from a USB is much faster.
You'll need one when you want to:
- Install Windows on a new PC
- Reinstall Windows on a PC that's acting up
- Repair a PC that won't start
Bootable USB Methods at a Glance
| Method | What It Does | Best For |
|---|---|---|
| Command Prompt (this guide) | Prepares the USB and copies the files with tools built into Windows | Doing it with no extra software |
| Media Creation Tool | Microsoft's own app downloads Windows 11 and makes the USB | A simple, guided setup |
| Rufus | A free tool that writes the ISO to a USB in one click | A quick USB without typing commands |
Requirements
- A USB drive of 8 GB or more. Everything on it will be erased, so copy off anything you want to keep.
- The Windows 11 ISO. Get it from Microsoft's Windows 11 download page under "Download Windows 11 Disk Image (ISO)". The current version is Windows 11 26H2.
- A PC running Windows, with an administrator account.
Can I Use This Guide for Windows 10?
Windows 10 reached the end of support in October 2025, so Windows 11 is the version to install now.
The steps are the same, though, so you can use them with a Windows 10 ISO too.
How to Make a Bootable USB Using Command Prompt
Step 1: Open the Windows ISO
Double-click the ISO file you downloaded. Windows opens it like a DVD in File Explorer, so note its drive letter, which is E: in this guide.
Now open the "sources" folder on that drive. You'll see a file called install.wim (or install.esd).
If it's bigger than 4 GB, you'll need Step 4. On most Windows 11 ISOs, it is.
Step 2: Prepare the USB Drive With diskpart
- Plug in your USB drive.
- Search for "Command Prompt" in the Start menu, right-click it and choose "Run as administrator". Even if you're logged in as an administrator, still run it as administrator.
- Type
diskpartand press Enter. - Type
list diskto see all the disks attached to your PC.

Find your USB drive by its size. In my case, it's Disk 1.
Be very careful with this number. The next commands erase the whole disk you select.
Now type these commands one by one, pressing Enter after each. Replace 1 with your USB drive's number:
select disk 1
clean
convert mbr
create partition primary size=32000
active
format fs=fat32 quick label=WINDOWS
assign
exit
Here's what each one does:
- clean removes all the partitions on the USB drive.
- convert mbr sets it up so it boots on both new UEFI PCs and old BIOS PCs.
- create partition primary size=32000 makes a partition of about 32 GB. Diskpart can't format anything bigger than that as FAT32. If your USB drive is 32 GB or smaller, you can leave out
size=32000. - active makes the partition bootable on older PCs.
- format fs=fat32 quick formats it as FAT32, which every PC can boot from.
- assign gives it a drive letter. I'll use U: for the USB drive.

Diskpart has done its part.
Step 3: Copy the Windows Files
In 2015, you could copy all the files from the ISO straight to the USB. Not anymore.
FAT32 can't hold a file bigger than 4 GB, and Windows 11's install.wim usually is. So copy everything except that one file.
Type this in the same Command Prompt window. Replace E: with your ISO's drive letter and U: with your USB's:
robocopy E:\ U:\ /e /xf install.wim
If your ISO has install.esd and it's smaller than 4 GB, just run robocopy E:\ U:\ /e and skip Step 4.
Step 4: Split install.wim
Here's the trick that makes it work. Windows Setup can read the install file in smaller pieces, and DISM, which is already built into Windows, can cut it up for you:
dism /Split-Image /ImageFile:E:\sources\install.wim /SWMFile:U:\sources\install.swm /FileSize:3800
Wait for it to finish.
Then open U:\sources. You'll see files like install.swm and install2.swm, and no install.wim.
That's correct. Setup finds the pieces by itself.
Also Read: Why You Should Never Shut Down Your PC During an Update
Step 5: Boot From the USB
- Plug the USB into the PC where you want to install Windows, and restart it.
- As it starts, press the boot menu key. It's usually F12, F11, F9 or Esc, depending on the brand. It often shows on screen for a second.
- Choose your USB drive. If you see it twice, pick the one that starts with UEFI.
On a PC that already runs Windows 11, you can also go to "Settings" → "System" → "Recovery" → "Advanced startup" → "Restart now", then choose "Use a device".
Windows 11 needs TPM 2.0 and Secure Boot. Most PCs from 2018 onwards have both, but sometimes they're turned off in the BIOS settings.
Is There an Easier Way?
Yes, there is. Two other options handle the same job:
- Media Creation Tool is Microsoft's own app. It downloads Windows 11 and makes the USB for you.
- Rufus is a free tool that writes the ISO to a USB in one click, and it handles the 4 GB problem by itself.
So why use Command Prompt at all?
It works on any Windows PC without installing anything. It's also the way to go when a tool fails halfway, because you can see exactly what's on your drive.
Common Errors and How to Fix Them
"The volume size is too big"
Your partition is bigger than 32 GB. Start again from select disk and use create partition primary size=32000.
"The media is write protected"
Some USB drives have a small lock switch on the side. Slide it off.
If yours doesn't have one, type attributes disk clear readonly in diskpart right after select disk, then carry on.
The PC Doesn't Show the USB in the Boot Menu
- Try another USB port. A USB 2.0 port works with the most PCs.
- Turn off "Fast Boot" in the BIOS settings.
- Make sure booting from USB is allowed there.
"A Media Driver Your Computer Needs Is Missing"
This usually means the copy went wrong. Download the ISO again, repeat Steps 2 to 4, and plug the USB straight into the PC instead of through a hub.
Can I Make a Linux USB the Same Way?
No, not with these steps. Linux ISOs are usually written to the drive as one whole image, so use a tool like Rufus for those.
This guide is only for Windows.
Also Read: How to Run Android on Your PC Now That Remix OS Is Gone
Final Thoughts
This is my updated guide on how to make a bootable USB using Command Prompt. It takes about 15 minutes, and most of that is waiting for the files to copy.
If you want full control and no extra software, Command Prompt is the way to go. If you want a quicker, guided route, Media Creation Tool or Rufus will do the job.
Once you've done it, you'll never need a Windows DVD again.
FAQs
How do I make a bootable Windows 11 USB with Command Prompt?
Clean the USB with diskpart and format it as FAT32, copy the ISO files with robocopy except install.wim, then split install.wim with DISM.
Why does install.wim need to be split?
FAT32 can't hold a file bigger than 4 GB, and Windows 11's install.wim usually is. DISM cuts it into smaller pieces that Windows Setup can read.
Can I use this method for Windows 10?
Yes. The steps are the same with a Windows 10 ISO, although Windows 10 reached the end of support in October 2025.
Is there an easier option than Command Prompt?
Yes. Media Creation Tool and Rufus both make a bootable USB with less typing, and Rufus handles the 4 GB limit for you.
Still stuck? Tell me through the contact page.
