Create Bootable USB to install Windows 7 or 8

There are many tools available on internet that help create a bootable USB/Flash drive to install Windows 7. But if you are running Windows 7 we can use built-in tools like diskpart to create a bootable USB drive without any third party tools.

All you need for this is a Windows 7 or 2008 R2 machine, a USB Flash drive with minimum of 4 GB capacity (Note that all data on this drive will be erased), Windows DVD and privilege to run command prompt in elevated mode.

Note:This post assumes you have only one physical hard disk on your machine and no other USB disks attached

First attach a USB flash drive to your system and if auto run kicks in close all related windows.

Fire up an elevated command prompt, invoke diskpart by typing diskpart at the command prompt and key in below commands one by one

list disk

select disk 1


create partition primary

list partition

select partition 1


format quick

assign letter=m


This finishes the USB disk preparation. Now key in the below command to copy the installation files of Windows 7/8/2008/2008R2/Server 8  to the above USB disk. Replace X: in below command with path to Windows installation files on hard drive or DVD drive on your machine

xcopy X:\*.* /s/e/f M:\

When the last command finishes, a bootable USB disk with Windows installation files is ready


You can even create a batch file and automate the process without typing commands one by one. For this just create two files one a batch file with .bat extension and a text file with .txt extension. In my case I have created USBBoot.bat and USBBoot.txt on my E drive

Copy and paste below text to batch file (USBBoot.bat) and save (Note: Replace X: with the path where both the files are kept)

@echo off
xcopy H:\*.* /s/e/f M:\

Copy and paste below text to .txt file (USBBoot.txt) and save


Place both the above files in the same location and now launch the batch file from the elevated command prompt and sit back for the command to complete.

As you can see this process requires no third party tools or utilities and can be used on any Windows 7 and above machines.


Click here to learn more about diskpart

Click here for diskpart technet page

Note: Cross posted from Experience – Inspire – Contribute.


5 thoughts on “Create Bootable USB to install Windows 7 or 8

  1. thanx alot buddy..
    itzz very helpful..
    i was trying to make match file but wasn’t able to write in diskpart..
    u had done a gr8 job..

  2. OK.. This works for a single OS install, but how would I setup a boot menu with different directories for multiple OS’s install options. For example. I have a 16GB Flash drive that is bootable. I want to set the boot menu to have option 1 – Windows 7, 2 – Windows 8, 3 – Windows 2003, 4 – Windows 2008. Thanks for the notes.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s