Make a Windows 7 USB Pen Drive Bootable with Diskpart
You can make a Windows 7 USB pen drive bootable with Diskpart, a tool already built into Windows. Here are the commands, and a builder that writes them for your disk and keeps you away from the wrong one.
Diskpart can make a Windows 7 USB pen drive bootable with no extra software:
- Open Command Prompt as administrator and type diskpart.
- Run list disk and find the pen drive by its size.
- Select it, clean it, create one partition, mark it active, and format it as NTFS.
- Copy every file from the Windows 7 disc or ISO onto the drive.
The one danger: the clean command erases whichever disk is selected, instantly and without asking. Choosing the wrong number wipes your hard drive. The builder below makes the commands for your disk number.
Diskpart Command Builder
First run diskpart, then list disk. Enter the number shown for your pen drive.

What you need
- A USB pen drive, 8 GB or larger. It will be erased.
- A Windows 7 installation disc or ISO and your product key. See how to get a Windows 7 install disc legally.
- A Windows PC where you have administrator rights.
Windows 7 itself is out of support since January 2020. Use it only where you must, and offline if you can.
The steps
Step 1: Open Command Prompt as administrator
Click Start, type cmd, right-click Command Prompt and choose Run as administrator.
Step 2: Start Diskpart and find the pen drive
diskpartlist diskDiskpart lists every drive with a number and a size. Disk 0 is almost always your main hard drive. The pen drive is the one whose size matches, for example 14 GB for a 16 GB stick. Unplug other USB drives first so there is only one candidate.
For comparison, a read-only check on our test PC showed a single internal disk: Disk 0, 477 GB, the system drive. That is the one you must never select.
Step 3: Clean and prepare the pen drive
Use the commands from the builder above. They run in this order:
| Command | What it does |
|---|---|
| select disk N | Points Diskpart at the pen drive |
| detail disk | Shows its name and size, your last chance to check |
| clean | Erases the selected disk completely |
| create partition primary | Makes one partition using the whole drive |
| select partition 1, then active | Marks it as the partition a BIOS starts from |
| format fs=ntfs quick | Formats it |
| assign, then exit | Gives it a drive letter and leaves Diskpart |
Step 4: Copy the Windows 7 files
Insert the Windows 7 disc, or double-click the ISO to mount it. Then copy everything across. With the disc as D: and the pen drive as E:, run:
xcopy D:\*.* E:\ /E /F /HChange the letters to match yours. The copy takes several minutes.
Step 5: Verify and eject
The pen drive should now hold bootmgr, setup.exe and folders named boot and sources. Eject it with “Safely remove hardware”.
Worked if: the target PC shows the pen drive in its boot menu and Windows 7 Setup starts.
Why this method works
A classic BIOS looks for a partition marked active and runs the boot code there. Diskpart on Windows 7 and later writes compatible boot code when it creates and formats the partition, and the bootmgr file you copied does the rest. That is all a boot tool does behind its buttons.
If the drive was prepared on an older system and will not start, run this from the Windows 7 disc’s boot folder, with E: as the pen drive: bootsect /nt60 E:
If the PC will not boot from the drive
Use the boot menu key, turn Secure Boot off, and plug into a USB 2.0 port. The full list is in Windows 7 bootable USB won’t boot: 7 fixes. If you would rather use a tool with buttons, see the Rufus method.
Did the Diskpart method work for you?
One tap. It helps the next reader choose a method.
Frequently asked questions
Is Diskpart safe to use?
Yes, as long as you select the right disk. The clean command erases the selected disk at once, so check the size with detail disk before running it.
Why mark the partition active?
A classic BIOS only starts from the partition marked active. Without it the PC skips the pen drive.
NTFS or FAT32 for a Windows 7 pen drive?
NTFS for a BIOS install, because the Windows 7 image file can be larger than FAT32 allows. FAT32 is needed only for pure UEFI.
Can I undo the clean command?
No. Clean removes the partition information straight away. Recovery software sometimes helps, but treat it as permanent.
Axee Davies is the founder of AxeeTech, publishing gaming guides, codes, and Windows how-tos since March 2013. A tech enthusiast for 13+ years — starting with smartphones and Android rooting — he now runs a site that puts out a new guide every day for Roblox players, traders, and Windows users. More about AxeeTech
More Windows You May Like
How to Save a Webpage to Desktop: Chrome, Edge & Firefox
How to Fix samsung notes pc error sa_1036 on Windows
Keyboard Not Working in Windows 11? 7 Quick Fixes
Touchpad Not Working in Windows 11? 6 Fixes by Laptop Brand
Mouse Not Working in Windows 11? 7 Fixes That Work
Open With in Windows 11: Change Which App Opens a File
How to Change App Recommendation Settings in Windows (Choose Where to Get Apps)
How to Change the Default Browser in Windows 11 (and Fix Links Opening in Edge)