Advanced Windows 7 installation from USB flash (UEFI, USB 3.0 info included)

Zap

Elite Member
Oct 13, 1999
22,377
2
81
I've only seen this thread by Yazoo. How to install Windows 7 from a usb flash drive and test that it works. I haven't tried those instructions but I assume they work. I have compiled some alternate instructions using information I have gleaned from around the net.

My primary purpose was to support USB 3.0 flash drives on USB 3.0 ports.

I am creating this thread first, and may add to it as needed. Note that I am not 100% sure every step listed is required.

REQUIREMENTS
* Windows 7 installation disc or ISO
* USB 2.0 or 3.0 flash drive 4GB or larger
* System running Windows 7 to create the installer
* System running 64-bit Windows 7 if creating 64-bit installer
* UEFI system running Windows 7 if creating UEFI compatible installer
* USB 3.0 drivers for your motherboard if using USB 3.0 port for install

1) Using USB flash media as the installer

2) Using USB flash media on UEFI motherboards

3) Using USB flash media on USB 3.0 ports

4) Making a semi-"universal" Windows 7 installer

5) Preparing Windows 7 disc/ISO with slipstreaming Service Pack 1

6) Additional useful add-ons

7) Clean install using "upgrade" media
 
Last edited:

Zap

Elite Member
Oct 13, 1999
22,377
2
81
WARNING: If you screw up and choose the wrong drive letter in DISKPART, you could lose all your data. Understand and accept the risks before proceeding. If you do not accept the risk of losing all your data due to YOUR fault, please do everyone a favor and keep installing using shiny discs.

2) Using USB flash media as the installer.

REQUIREMENTS
* Windows 7 disc or ISO
* USB flash drive 4GB or larger, that doesn't contain any data you need (it will be formatted)
* The understanding that if you screw up, YOU MAY/WILL LOSE DATA ON THE COMPUTER YOU ARE USING.

STEP1:

Have the Windows disc in your DVD drive, or the ISO mounted so you can access the files it contains.

Have the USB flash drive attached so you can use it.

STEP2:

Open an elevated command prompt (right click CMD, run as administrator) and type in the following commands, one at a time, allowing time for a command to finish before proceeding to next command. IMPORTANT - PLEASE CHANGE THE DISK NUMBERS AND DRIVE LETTERS TO CORRESPOND TO YOUR SYSTEM. FAILURE TO DO SO WILL RESULT IN DATA LOSS AND POTENTIALLY DELETING ENTIRE DRIVES IN YOUR COMPUTER. Read the notes below.

Code:
DISKPART
LIST DISK
SELECT DISK 1
CLEAN
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE
FORMAT /Q FS=NTFS
ASSIGN
EXIT
D:/BOOT/BOOTSECT.EXE /NT60 U:

Here is the breakdown of what the commands do, and where you should change the info to match your system TO AVOID DATA LOSS.

DISKPART
This runs the DISKPART utility that is included with Windows 7.

LIST DISK
This lists the disks that are attached to your system.

SELECT DISK 1
You are selecting the disk number (from 0 to however many) that corresponds to the USB flash drive that you are using. If you select the wrong disk, you may/will lose data.

CLEAN
CREATE PARTITION PRIMARY
SELECT PARTITION 1
ACTIVE

FORMAT /Q FS=NTFS
It is a lot faster, depending on the capacity and speed of the drive, to do a quick format (the /Q part). The link I recommended stated that it took 30 minutes to format an 8GB USB flash drive. Quick-format takes literally seconds. Also, flash memory has limited writes. Typical cheap USB flash drives use TLC NAND rated for 1000 writes before degrading. A full format is guaranteed to take up one write cycle for the entire capacity of the drive. Doesn't seem like much, but is easy enough to avoid. Oh yeah, some have reported that it is better to use FAT32 because some systems won't work with NTFS.

ASSIGN
EXIT
Exits out of DISKPART but still at command prompt.

Code:
D:/BOOT/BOOTSECT.EXE /NT60 U:
This copies the boot sector over.
D corresponds to the Windows 7 installation disc, or the mounted ISO.
U corresponds to the USB flash drive you are using.
Please adjust drive letters to match your system.

EXIT
Exits out of the command prompt.

STEP3:

From Windows Explorer, find the Windows 7 installation disc/mounted ISO. Drag and drop EVERYTHING from the disc/ISO into the USB flash drive.

NOTE1: This was my original source. How To Make A USB Installation Disk For Windows 7 Without Extra Software

NOTE2: I am not responsible for any data loss you may incur by selecting or formatting the wrong disk. I'm serious. If you screw up, your fault. Fuck off.

NOTE3: I'm not sure if all the parts are needed. For instance why do all the DISKPART rigamarole? Why not just quick format and write the boot sector? Also, I've heard that a UEFI system does not need the boot sectors at all, and instead just needs the UEFI file (see below on UEFI).

NOTE4: I've also heard that some UEFI systems can just install from an ISO, in which case you would need the USB flash drive formatted as NTFS, and then just copy over the ISO. Not sure on this one.
 
Last edited:

Zap

Elite Member
Oct 13, 1999
22,377
2
81
3) Using USB flash media on UEFI motherboards.

This information is more rare than slipstreaming and creating USB installers, so I'll write it up first. Why this is important is because often a motherboard with a UEFI BIOS (for instance all the recent graphical BIOSes on Intel motherboards) will be unable to install Windows from the USB flash drive because of the way UEFI handles USB. Thus, installing from a disc in a SATA DVD drive works fine, but USB drives won't.

STEP1:

Create your USB installer (see earlier in this thread).

STEP2:

Obtain a copy of the file
bootmgfw.efi

It is located in the following directory on a system running Windows 7 64-bit
\Windows\Boot\EFI

STEP3:

Find the following directory on your USB installer
\efi\microsoft\boot

Create the directory
\efi\boot

Copy the contents of the \efi\microsoft\boot directory to the \efi\boot directory.

STEP4:

Copy the bootmgfw.efi file to \efi\boot, and rename it to bootx64.efi.

NOTE1: I got the information here. Installing Windows 7 in native EFI mode from USB

NOTE2: SUPPOSEDLY if you only use the USB flash drive on UEFI systems, you don't even have to go through the rigmarole on prepping it with DISKPART and making the USB flash drive bootable. You can just copy the contents of the Windows disc/ISO over and follow the above instructions, and it will be bootable on a UEFI system. However, that wouldn't be very useful if you have to use the installer on an older rig.
 
Last edited:

Zap

Elite Member
Oct 13, 1999
22,377
2
81
4) Using USB flash media on USB 3.0 ports.

So you have your USB flash drive installer all ready to go, yet when you go to install you find out that the Windows installer keeps asking for a driver. Then you notice that you have it plugged into a blue USB port, which means the port is USB 3.0. Alternately, you actually have a USB 3.0 flash drive and wish to make Windows 7 install super quick on an SSD. So, what do you do?

REQUIREMENTS:
USB flash drive prepared using previous steps.
USB 3.0 drivers for your motherboard, as a ZIP file and not an EXE, for your version (32-bit or 64-bit) of Windows 7.
WAIK (Windows Automated Installation Kit) for the command-line "dism" command (optional? I didn't need it). download WAIK here

STEP1:

Create a directory called winpe somewhere on one of your drives.

STEP2:

On your USB flash drive, find the \sources directory. Find the boot.wim file inside that directory, and copy it to the winpe folder you previously created.

STEP3:

In the winpe folder, create a usb3 folder.

STEP4:

Extract the drivers from the zipped USB 3.0 driver file and put them in your usb3 folder.

The drivers will usually be just 3 or 4 files in a sub-directory within the zipped driver file, consisting of a couple INF files and some matching SYS or CAT files.

Here is an example of the USB 3.0 driver files for the TI chipset. I've usually found them in the zipped archive in an x64 subdirectory.
Code:
tihub3.cat
tihub3.inf
tixhci.cat
tixhci.inf

STEP5:

Open an elevated command prompt (right click CMD, run as administrator) and navigate to the winpe folder.

STEP6:

Type in the following commands.

Code:
dism /mount-wim /wimfile:boot.wim /index:2 /mountdir:mount

dism /image:mount /add-driver:"usb3" /recurse

dism /unmount-wim /mountdir:mount /commit

STEP7:

Copy the modified boot.wim file back to the \sources directory of your USB installer, overwriting the original.

NOTE1: Both USB flash drive and USB port need to be USB 3.0 to realize any additional speeds.

NOTE2: When purchasing flash drives, pay attention to the published read speeds. That will be more important than write speeds during actual installs. Thus, you can get away with using cheaper drives since the more expensive ones tend to also have faster writes. USB 2.0 is limited to just over 30Mbps max throughput. I bought a 16GB USB 3.0 flash drive with claimed 100Mbps reads for really cheap.

NOTE3: Folder names may or may not be arbitrary.

NOTE4: I got started with this forum thread.

NOTE5: I have compiled a number of USB 3.0 drivers to make my own installers more "universal." I've tried to list all USB 3.0 controllers that I know about, which are the following chipsets.
Code:
Intel
Asmedia/AMD
Renesas/NEC
TI
VIA
Etron
 
Last edited:

Zap

Elite Member
Oct 13, 1999
22,377
2
81
5) Making a semi-"universal" Windows 7 installer.

Once you have created your Windows 7 installer on your USB flash drive, you can make it semi-"universal" so that it prompts you to choose which version of Windows 7 you wish to install.

*I HAVE NOT YET TESTED THIS*

On your USB flash drive, look under the \sources folder for the ei.cfg file. Edit the ei.cfg file with Notepad. It will contain a few lines of text.

Code:
[EditionID]
HomePremium
[Channel]
Retail
[VL]
0

[EditionID] can be versions such as HomePremium, Ultimate, Basic, etc.

[Channel] can be Retail or OEM.

[VL] can be 0 or 1 and stands for Volume License.

Alternately you can just delete the file altogether and Setup will ask you to choose from all available versions.

NOTE1: Some discs/ISOs do not contain all versions. For instance the one I'm looking at right now contains:
Code:
HOMEBASIC
HOMEPREMIUM
PROFESSIONAL
ULTIMATE

I've heard of ones that contain STARTER and ENTERPRISE, as well as ones that don't contain any extra versions at all.

NOTE2: AFAIK it will be whichever "bit" version disc/ISO you started with, whether 32-bit or 64-bit.

NOTE3: You still need a valid product key that is for the version you installed. For instance if you use this to "unlock" Ultimate on the installer, you will install Ultimate on your machine. However, if the product key you have is for Home Premium, then it will refuse the key as invalid.

NOTE4: Even if this sounds useless, it can be useful if you often reinstall Windows for other people, plus if you want to experiment with different versions (hint: most people don't need more than Home Premium 64-bit, EVER).

NOTE5: I found the info in various places, mostly on deleting the file. However, this link was useful in describing what the file contained.
How to Choose Desired Windows 7 Edition / Version During Setup?
 
Last edited:

Zap

Elite Member
Oct 13, 1999
22,377
2
81
1) Preparing Windows 7 disc/ISO with slipstreaming Service Pack 1.

There's already a lot of good information out there so I'll leave you guys with this link, which seems to be a decent write-up. First page in the following link is on slipstreaming.

How to Speed Up Windows 7 Installs With Slipstreaming and USB

I may re-write it here at a later time. This is something I have not done with Windows 7, but have with XP. I may try it if I get the chance.

11/4/12 EDIT: This post points to the Windows Updates Downloader which can help slipstream all updates (at the point you are making this). Thanks, hclarkjr. This could be a real future time saver.
 
Last edited:

Zap

Elite Member
Oct 13, 1999
22,377
2
81
6) Additional useful add-ons

If there is spare space on the USB flash drive, fill it up with useful stuff! Just create a directory on it to hold various installers.

Obviously you can pre-download various drivers that are somewhat universal such as AMD and Intel chipset drivers, or Nvidia/AMD/Intel graphics drivers.

For recent Intel systems, Intel Management Engine is good to have. Pretty useless for most of us, but it will get rid of an unknown device in Device Manager.

Microsoft Security Essentials is useful. It is a free anti-virus/malware that can be downloaded directly from Microsoft. It is not necessarily the best, but is competent enough. I've read up about it and the biggest complaint most people have with it is that there is nothing to fiddle with. You can update it manually (though Windows Update will also update it) or do a manual quick or full scan (though Task Scheduler will have one already scheduled). That's about all you can do, and for some reason that irks many people. Me? I like the fact that it is free, frequently updated, doesn't need babysitting (OMFG hate having to whitelist crap that shouldn't be flagged anyways), doesn't take up much resources (my theory is that some of the bloated popular anti-virus keeps viruses off your system by making it so unresponsive that viruses are unable to install themselves) and doesn't seem to make a habit of generating false positives or warning you about stuff that "might" be harmful like browser cookies.

Your favorite alternative web browser installer can be useful.

Your favorite PDF viewer installer can be useful.
 
Last edited:

Zap

Elite Member
Oct 13, 1999
22,377
2
81
7) Clean install using "upgrade" media

For those of you like myself who own a zillion legit copies (okay, really closer to 10) of Windows XP and/or Vista and purchased an "upgrade" version of Windows 7 to save some money, we can do a clean install using that upgrade version without having to go through the rigamarole of installing the older OS and then immediately upgrading to Windows 7.

STEP1:

Perform a clean install using Windows 7 Upgrade.

During installation, when Setup asks you for the product key do not type it in, and uncheck the "activate when online" option.

STEP2:

Make sure everything is kosher before activating Windows. I ALWAYS do this when possible regardless of using upgrade, OEM or full retail versions of Windows 7 (or Vista). This is to avoid potential hassles if I have to reinstall again immediately. Sometimes I don't even activate for a while and just use the system (Windows will let you go 30 days). I do the following before activation.

1) Make sure my overclocks are stable (or for the paranoid, make sure un-overclocked systems are stable).

2) Install all drivers.

3) Install all Windows updates. Keep rebooting and manually clicking on "Check for updates" until there are no more.

STEP3:

(This is a required step but for some reason most of the time it is already the proper value)

Run REGEDIT and find
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Setup/OOBE/

Change MediaBootInstall from "1" to "0".

Exit REGEDIT.

STEP4:

Run an elevated command prompt (right click CMD, run as administrator) and type the following command.

slmgr /rearm

After it completes whatever it has to do, a window will pop up asking you to restart Windows. Do that now.

STEP5:

Once Windows is restarted, go to System properties (Windows key + Pause Break, or find it in Control Panel).

At the bottom under "Windows activation" click on "Activate Windows."

It will ask for the product key. Type it in and activate.

NOTE1: Microsoft actually endorses one method of clean installation using the upgrade. It is the double-install. Basically you do a clean install, then immediately "upgrade" by installing over itself. I personally wouldn't do this because of extra time required plus extra wear on SSDs, since the hack is so quick and simple.

NOTE2: Supposedly for some people (maybe a delete-install instead of on a clean HDD?) Windows 7 Upgrade can just be activated right after installation and doing Windows Updates, with no additional hassle. Since the hack is so quick and simple, I don't even bother trying.

NOTE3: This was my main source, though such info is available all over the place. Clean Install Windows 7 with Upgrade Media
 
Last edited:

KentState

Diamond Member
Oct 19, 2001
8,397
393
126
When I was looking for a way to install from an USB drive, I remember locating some software that made this much easier.
 

Zap

Elite Member
Oct 13, 1999
22,377
2
81
When I was looking for a way to install from an USB drive, I remember locating some software that made this much easier.

Usually such software preps the USB flash drive to make it bootable, and sometimes helps copy over the installer files. That would be Step 1. I am not aware of any such single piece of software that adds USB 3.0 drivers or does any of the other optional steps. If you know of any, please link.
 

KentState

Diamond Member
Oct 19, 2001
8,397
393
126
Usually such software preps the USB flash drive to make it bootable, and sometimes helps copy over the installer files. That would be Step 1. I am not aware of any such single piece of software that adds USB 3.0 drivers or does any of the other optional steps. If you know of any, please link.

You are right. I wasn't concerned with USB 3.0 since that's MB specific. Would be nice if software vendors would just put the media on USB.
 

Zap

Elite Member
Oct 13, 1999
22,377
2
81
I wasn't concerned with USB 3.0 since that's MB specific.

For my own installer, I've implemented the USB 3.0 drivers from ALL of the controllers that I know about. That way it is universal. :)
 

desperado836

Junior Member
Nov 16, 2012
2
0
0
I tried this for my new laptop, 17r (7720) but it keeps asking for the drivers at install, no matter if I use the drivers straight from Dell or Intel, they both look the same to me. Been installing Win 7 from usb for a long while now, but these USB 3.0 only ones are being a pain, least I can install by DVD though...
 

vailr

Diamond Member
Oct 9, 1999
5,365
54
91
Sorry, but: is all that effort really worth the marginal speed boost of USB 3.0 over USB 2.0 when installing Windows?
Maybe if you're an I.T. guy installing Windows on dozens of machines. But otherwise?
Plus: you forgot to specify: "use a 4 Gb or larger USB 3.0 flash drive" in your instructions. Also: various USB 3.0 flash drives can substantially differ in their relative read speeds.
 

desperado836

Junior Member
Nov 16, 2012
2
0
0
Sorry, but: is all that effort really worth the marginal speed boost of USB 3.0 over USB 2.0 when installing Windows?
Maybe if you're an I.T. guy installing Windows on dozens of machines. But otherwise?
Plus: you forgot to specify: "use a 4 Gb or larger USB 3.0 flash drive" in your instructions. Also: various USB 3.0 flash drives can substantially differ in their relative read speeds.
Not really, but when you have hardware that does not have usb 2.0 ports, or a legacy option of some sort for the usb 3.0, or even a optical drive for that matter, this is the only solution if you want Win 7. I like to get this to work, but it is not working out for me, and it is frustrating to say the least.
 

Jognt

Junior Member
Oct 7, 2013
1
0
0
Even though this is almost a year old thread, I thought I'd post because the information contained is very usefull.

You can perform a clean installation of Windows 7 using upgrade media if there is a qualifying OS on the drive you're installing to at the moment you start the Windows Installer.

I believe the validity check is performed before the point where you format the drive.

Example:
1. I reboot from my current Windows 7, boot from USB/CD, format my SSD, and select it as the target for the installation.
Result: Installation proceeds without problems.

2. I reboot from my current Windows 7, boot from USB/CD, format my SSD, remember I wanted to change a bios setting, boot from USB/CD again, and perform the installation.
Result: When entering the product key for the upgrade license, Windows will say you need a full license and that the installation is not eligible for an upgrade.

My €0,02.
 

Pardus

Diamond Member
Jun 29, 2000
8,197
21
81
The instructions from my post don't work anymore, updated that thread to point to here.