Windows optimize

How do I ... create an installation flash drive for Windows 7?

Steven Warren shows you a no nonsense approach to creating a flash key drive that you can use to install the Microsoft Windows 7 operating system.

I have read a lot lately on how to install the Microsoft Windows operating system from a flash drive. The directions on how to do this were spotty at best and required lots of third-party tools. None of this is necessary. Here is a no-nonsense approach to creating a flash key drive that you can use to install the Windows 7 operating system.

This blog post is also available in PDF format in a TechRepublic download.

We will begin by inserting a flash drive key into a laptop or desktop, as shown in Figure A.

Figure A

Next, click the Start button and type cmd in the instant search bar. Right-click on the cmd entry and select Run as Administrator, as shown in Figure B.

Figure B

Now we are ready to run Diskpart. Type diskpart, as shown in Figure C. Type List Disk, as also shown in Figure C, to find your USB key. In this case, it is Disk1.

Figure C

We will continue by typing Select Disk 1 and cleaning the flash key by typing clean, as shown in Figure D.

Figure D

Let's continue by typing create partition primary, as shown in Figure E.

Figure E

Next, type active to mark the disk as active; we are getting closer to the finish line. Now we are ready to format our partition by typing Format FS=Fat32, as shown in Figure F.

Figure F

Now you can copy over the installation files of Windows 7, as shown in Figure G. (Note: This technique applies to Vista or XP also.)

Figure G

Once you have copied the installation files, the next thing is to configure your laptop/PC to boot from the flash drive. You should log in to your BIOS settings to make sure booting from USB is available. Finally, start your laptop/desktop and select from which boot device you want to load the operating system. In this example, I will choose the USB 4GB SanDisk, as shown in Figure H.

Figure H

It is time to get a cup of coffee and let your Windows operating system load, as shown in Figure I.

Figure I

Stay on top of the latest XP tips and tricks with TechRepublic's Windows XP newsletter, delivered every Thursday. Automatically sign up today!

25 comments
kgrady
kgrady

What files are you actually copying, local hard drive w/ O/S already on it or Win 7 install DVD..?? If local, which files..?? Nevermind... I'm assuming Win 7 install DVD.... Thanks..!

ashamess
ashamess

I've been searching for a succinct and easy to follow set of instructions, well done!!

barry.brown2006
barry.brown2006

Actually, the drive now does boot. I neglected to see the one line that says to make it active. Even though there is no figure for that command nonetheless it has to be there. After all the files were transfered, I went back and ran diskpart again, selected the disk, selected the partition and then could make it active. The USB stick is now bootable with the Win7 files transfered from my installation DVD. Thanks for the info

barry.brown2006
barry.brown2006

I have followed the instructions exactly and copied all files to the flash drive however there is no mention of the boot files needed to actually boot from the drive. My bios can boot directly from the drive but since there are no bootable partitions, it defaults to the C: drive. I have Win7 64 and Win7 32 drives with a dual boot using easybcd. I hit F8 to get to the boot menu, and select the Flash drive and nothing. I have read elsewhere you need to make the USB drive bootable and this doesn't do it.

armamatt
armamatt

Still not very clear. After drive is formatted and cleaned, where do you find the install files.

Jacky Howe
Jacky Howe

Works a treat with the easy to understand instructions that you provided. A lot slower than DVD but it would come in handy later on to reinstall Vista or W7 to a System with no DVD access. Edit for content

Dogcatcher
Dogcatcher

Why would any one want to bother with all the typing at a command prompt when the capability exists to do the same tasks via a GUI? Program > Administrative Tools > Computer Management > Storage > Disk Management. My XP Pro system recognizes and formats USB drives w/o problem, and knows to switch to FAT32 for large drives. Seems a lot easier than fussing with DiskPart.

sonnystarks
sonnystarks

You forgot to include info on my original source for Windows 7. Where am I getting it from to copy to the USB drive in the first place? Do I download Win7 to my downloads folder first? Do I get these files I am copying over from a previous installation of Win7 on computer "A" for installation on Computer "B"? I know the initial reply to just provide a web address for the Win7 download is tempting but please provide a complete answer. Once I get it downloaded into my "Downloads" folder, what do I do with it? Copy it to the USB? Install it to this computer first??????

piyush.ml20
piyush.ml20

the diskpart is not recognizing usb disk for windows xp in the disks list.

Mark W. Kaelin
Mark W. Kaelin

Do you have an operating system on a bootable flash drive? Which operating system is it? Why do you have it, what do you use it for? Do you have a different way of creating an installation flash drive?

TonytheTiger
TonytheTiger

does it let you create a [b]primary partition[/b] on your USB flash drive?

Steven S. Warren
Steven S. Warren

Run thru the tutorial. Download the bits to--should be an ISO image. Extract the contents to your computer. Copy the bits to your flash drive--Load Windows 7..Simple.

seanferd
seanferd

Edited: I incorrectly stated otherwise, but: "those files and folders are what gets copied from the DVD" - courtesy of Jacky Howe. Second, the Windows 7 beta was a time-limited download, and is no longer available - has not been for some time now. So, for Windows 7, you'll need to wait until it is released and you can buy a retail copy or a computer with Win 7 pre-installed. But you would have gotten it from the Microsoft download site. It was quite well publicized, as Microsoft has never before released a public beta of an operating system. http://www.microsoft.com/windows/windows-7/beta-download.aspx

Mark.Moran
Mark.Moran

I've removed this post to double check my findings..

christian.waymouth
christian.waymouth

I just found that I couldn't see my usb drive when I entered the command "List Disk" using XP, but I can see it by typing "List Volume" and am able to select it with "Select Volume 4" i.e. DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ---------- ------- ------- --- --- Disk 0 Online 37 GB 0 B but... DISKPART> list volume Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 0 L DVD-ROM 0 B Volume 1 E DVD-ROM 0 B Volume 2 G DVD-ROM 0 B Volume 3 C NTFS Partition 37 GB Healthy System * Volume 4 Q LEXAR FAT32 Removeable 3824 MB and the * by Volume 4 indicates that it is selected

Steven S. Warren
Steven S. Warren

Can you clarify? Give me your steps. You should have no problems if you follow the steps.

Dogcatcher
Dogcatcher

The short answer to your question is "Yes". To get a completely empty USB to test with, I had to use FDisk to delete an existing partition. It seems that XP's disk manager does not like the idea of removing the last primary partition from a drive. XP recognized an un-partitioned drive and readily created a new partition. The only option was for a primary partition that occupied the entire USB drive. After partitioning, you can select FAT or FAT32 formatting, or leave the drive unformatted. XP's disk manager insists on assigning a drive letter to the USB. You'll probably want to remove that after the formatting. Note that if there already is a primary partition on the USB drive, XP's disk manager will not create another partition in unallocated space. Because of the limitations built into the Windows disk managers, I keep at hand a small USB drive that boots to Win98 DOS and that includes FDisk and PartitionMagic, in addition to some other utilities. The old DOS tools are a real help when you want to create a complex disk structure.

don.howard
don.howard

There are some adjustments that need to be made for Windows 7 (or Vista). For example, the article refers to running bootsect with a /nt52 parameter, but this only applies if the OS is older than Vista. I used this process from an XP system: Use Disk Management (Logical Disk Manager) to make sure the USB drive is formatted as a FAT (16 or 32) drive and is marked as Active. Open a command prompt and navigate to your Windows 7 install files. CD to the Boot folder Run: Bootsect.exe /nt60 driveletter: (where driveletter is the letter of your target usb-flash drive.) Copy all files from your Windows 7 install source to the usb drive. Now, you should have a bootable usb-drive for your Win7 install. At least it worked for me. YMMV Good Luck

zagerm
zagerm

So what your saying is, you can run Windows 7 on your flash drive? Then, you can change you bios back to boot from your laptops HD and then run Vista. Like dual-Boot?

Steven S. Warren
Steven S. Warren

I wrote this using Windows Vista and Windows 7. They work fine.

ashamess
ashamess

I had the same issue using XP tools, could not format without automatic drive designation. Every good IT tech I know has this last paragraph down pat, because those tools are very handy in a pinch. Thanks again for the prompt to get all these on USB.