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.

Quick answer

Diskpart can make a Windows 7 USB pen drive bootable with no extra software:

  1. Open Command Prompt as administrator and type diskpart.
  2. Run list disk and find the pen drive by its size.
  3. Select it, clean it, create one partition, mark it active, and format it as NTFS.
  4. 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.

Chart of the six Diskpart commands that prepare a bootable USB pen drive
Save this chart: the six commands in order.

What you need

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

diskpart
list disk

Diskpart 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:

CommandWhat it does
select disk NPoints Diskpart at the pen drive
detail diskShows its name and size, your last chance to check
cleanErases the selected disk completely
create partition primaryMakes one partition using the whole drive
select partition 1, then activeMarks it as the partition a BIOS starts from
format fs=ntfs quickFormats it
assign, then exitGives 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 /H

Change 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.

More Windows You May Like

Leave a Reply

Your email address will not be published. Required fields are marked *