2011-9-10 New version of NT6_Fast_Installer.zip available (fixes 'bootsect.exe not found' error).
2012-11-08 New version of NT6_Fast_Installer.zip available (bcdboot error Status = c000003a fixed if using an EFI Windows system to prepare the USB drive with - found by James Leyden - thanks James!).
2012-11-15 Revised to use either Win7 bcdboot or Win8 bcdboot.
RMPrepUSB Blog - please leave a comment or feedback on RMPrepUSB or this Tutorial (please mention Tutorial number).
To boot Windows 8 from USB - please see Tutorial #53
<<<Click here for a 32GB USB 3.0 70MB/s USB pendrive!!!
This tutorial does not make a Windows installer USB drive, it actually puts a copy of Windows 7 onto a USB drive and makes it bootable. When you have made it, you can boot from it as follows:
This tutorial as based on fujianabc's Reboot.pro forum post 'NT 6.x fast installer: install Win7 directly to USB external drive' and his excellent scripts (now with reg tweak by 'cdob' from reboot.pro -USBBootWatcher is no longer required). The instructions in that forum post #1 & #2 and some of the prompts in the installer.cmd file that fujianabc provides were however confusing and potentially dangerous (you could accidentally corrupt your system drive) - so I have slightly modified his script to make it clearer and easier to use. It also now automatically finds and uses the 3 files that are needed from the MS WAIK, so you don't need to manually copy them first.
The instructions below assume that you have a USB drive (USB Hard Disk - recommended, or USB Flash drive - slow!) and you want to install Windows 7 onto it using a Windows 7 install DVD (or ISO file) as the source. You can use any 32/64-bit mix - e.g. use a Windows 7 64-bit PC to install say Vista 32-bit OS from a Vista 32-bit installation DVD onto a USB drive, or use a Windows XP system to install Windows 7 64-bit onto a USB drive using this method. Note that some CPUs' (e.g. some netbook Atom 32-bit CPUs) won't run a 64-bit OS, so a 32-bit version of Windows 7 is usually best for these.
Note that there are some pitfalls with this Windows USB drive once you have successfully made it:
Alternatively - using this method, you could remove an internal hard drive from a system, connect it to your main PC (either directly or using a USB drive caddy), format it and install Windows onto it using the Installer.cmd script in the tutorial, and then put the hard drive back into the original system (or a different system) and boot it.
The procedure below works and has been tested using an ISO of the RTM/Gold version of Windows 7 and the SP1 version of Windows 7.
To install a bootable Windows 7 (or Vista or Win2K8) OS onto an external USB drive.
You need to follow this tutorial using a Windows PC (or possibly by booting to WinPE v2 or v3).
The Windows files are taken from a source installation DVD or a mounted ISO file. If you do not have a Windows 7 source DVD, you can download an ISO file (see External Links page)
The system you use is assumed to be a Windows 7 system, although if you install the WAIK, these instructions should work on an XP system or later OS.
1.You need to have a source DVD or a mounted ISO file (mounted as a drive letter). If you only have an ISO file, you can use SlySoft Virtual Clone Drive or ImDisk or any similar software to mount the ISO as a drive volume - e.g. O:. This allows the script to access the files within the ISO file as a drive letter.
2. You may need to partition and format the target USB disk using RMPrepUSB if it is not already formatted as NTFS. Even if it is formatted as NTFS, ensure the partition is 'Active' to make it bootable ('Mark partition as Active' in Windows Disk Manager). It is better and easier to re-format the drive using RMPrepUSB as shown below.
IMPORTANT: The USB disk volume must be formatted as NTFS and must be allocated a drive letter by Windows.
Set RMPrepUSB settings 1 to 5, then click 6 Prepare Drive.
If it fails to format, click on 6 Prepare Drive again.
3. Download NT6_Fast_Installer.zip (works for Win7 RTM/Gold and Win 7 SP1) from the Downloads page and extract the contents to an empty folder on your PC's hard drive - let us say you cretae a new folder on the hard disk is called C:\NT6Inst for the sake of this Tutorial.
4. Download and install the Microsoft Windows 8 WAIK files.
If you don't want to install the WAIK, you will need to manually copy the correct versions of bootsect.exe, imagex.exe and bcdboot.exe (bcdboot.exe is already in Win7) to the C:\NT6Inst folder.
See Tutorial #83 for a method of obtaining these files in about 30 seconds without needing to download and install the whole WAIK. Download the files from the Windows 8 WAIK and copy them to the C:\NT6Inst folder. If you are running on a 64-bit version of Windows (not installing, but actually using a 64-bit version of Windows to prepare the drive) then use the amd64 versions, if you are using a 32-bit version of Windows then use the x86 versions of the tools.
If you already have the Windows 7 or Windows 8 WAIK installed, the 3 files needed will be found and automatically copied to your C:\NT6Inst when you run the Installer.cmd script.
5. Right-click on the file C:\NT6Inst\INSTALLER.cmd and choose Run as Administrator. If any files are missing you will be informed.
6. You should now see a green window with some text. Hit Enter and the Enter again.
7. Now find the Install.wim file on your Windows installation DVD (or mounted ISO volume) - double-click to select it:
8. You will now be presented with a list of different Editions - these were all within the Install.wim file that you selected, choose the one you want to install (remember that you will need an activation key which matches the version you choose, if you want to activate Windows).
9. Now you will be asked to select the target USB hard disk that you want to install Windows onto:
Note: If the USB disk has files on it, the script will try to format it for you, you will need to enter in the volume name to confirm this.
10. Now enter in the same USB drive letter again for the boot partition (use the same USB drive letter again):
11. You will now be asked if the disk is a USB disk - answer Y.
If however, you intend to disconnect the drive and put the drive inside another system (e.g. notebook) before you boot from it, then say No to this question.
12. Unless you have a Vista or Server 2k8 source DVD, you will be asked what drive letter you want Windows to use when it boots from the USB drive. Use the default by hitting Enter.
13. You will now be presented with a final summary screen - hit Enter to start the installation and wait a while.
Check this carefully before you hit Enter!
Note that the Target Drive letters should be the same if your USB drive only has one partition.
Installation completes in just 7 minutes for a USB 3.0 Hard Disk install
Now use the Windows Safely Remove USB Device System Tray icon to dismount the USB drive and then try it on a system to see if it boots!
Don't forget that once you have booted the image on one system, it will probably crash if booted on a different system because the correct drivers for the first system will already be installed on the previous boot.
Once Win7 is running, you will also need to add the correct third-party drivers to get all the hardware working correctly.
To speed up the Windows installation, once booted from the USB drive and in Windows, go to Device Manager and select Disk Drive and double-click on it. Then select the Policies tab and enable the Better Performance (Enable write caching) option.
WARNING: If you have installed the 'Gold RTM' first version of Windows, do not update the version with a Service Pack update (SP1) as this could break the installation - instead re-install using the SP1 ISO/DVD. Normal hotfixes and updates will be OK though.
If you boot from a USB disk using a system that also has a working internal fixed hard disk, then Windows will automatically create and use a pagefile.sys on the internal hard drive. This will also prevent you from formatting or re-partitioning the internal hard drive. If however, you boot from a system that does not have an internal HDD, Windows will warn you that it cannot create a pagefile - Windows will not create a pagefile on a 'removable' disk.
If you wish to make Windows use the USB hard drive for the page file, follow the instructions on reboot.pro by karyonix here (and here for the latest 32/64 bit version of diskmod and registry entries). Note that you should NOT use a pagefile on a USB Flash drive as it will be even slower and will also wear out the Flash memory.
If you want to connect the USB drive to a different system, you may need to sysprep the drive - otherwise it may crash on boot and also could prevent it from booting on the original system again too (changes/corrupts boot files and registry)!
A Sysprep cmd file should be already present on the Windows Desktop, once the system has booted from the USB drive - if you right-click on this and Run as Administrator it will reset and shutdown the system. You can then boot the USB drive on a different system that has different hardware. This sysprep command should run from an administrator command prompt and uses the command: \Windows\System32\sysprep\sysprep.exe /oobe /generalize /shutdown
Once the computer shuts down, you can boot the USB drive on a different system which has different hardware. If you want to move it to another system again or back to the first system, don't forget to run Sysprep again before you move it!
If the BCDBOOT command fails with a [0xC000003a] error Warning: Resource files missing ... then you probably are running the Installed.cmd script on a Windows system that has booted from a UEFI BIOS instead of an MBR BIOS. In this case download bcdboot.exe from the Windows 8 WAIK and replace the version in your C:\NT6Inst folder with the Windows 8 version and run Installer.cmd again.
If you are using a USB HDD drive and Windows 7 boots and shows a 'Performance Options' form, this is due to having no page file. Windows will not create a page file on a removable drive. If you have no internal disk available, you can create a page file on the USB drive using this fix - see http://reboot.pro/9461/#entry86619.
I have not tetsed the following instructions and so I cannot vouch that they will work!
Note: You will need to download and install the Windows 7 or 8 WAIK onto your 'office' computer first before you can run DISM.
Before you run Installer.cmd to make the USB drive, you first need to add the USB 3 drivers to the \sources\install.wim file.
First extract the install.wim file from the Windows 7 install ISO onto your hard disk so that it can be modified.
It is suggested that you disable your antivirus software and close all Explorer windows now.
At an elevated (Run as Administrator) command prompt, navigate to the Windows OEM Preinstallation Kit (Windows OPK) servicing folder, and type the following command to retrieve the name or index number for the image you want to modify.
Dism /Get-WimInfo /WimFile:C:\test\images\install.wim
An index or name value is required for most operations that specify a WIM file.
Type the following command to mount the offline Windows image contained in the install.wim file (change the name value to exactly the name of the version you intend to use, as listed).
Dism /Mount-Wim /WimFile:K:\Sources\install.wim /Name:"Windows 7 xxxx" /MountDir:C:\test\offline
Instead of using /Name:"xxx" you can use for instance /Index:2 (for image number 2)
At a command prompt, type the following command to add a specific driver to the image. You will need to have the correct USB 3.0 Windows 7 driver files available for the intended target system(s).
Dism /Image:C:\test\offline /Add-Driver /Driver:C:\drivers\myUSB3driver.INF
Multiple drivers can be added on one command line if you specify a folder instead of an .inf file. To install all of the drivers in a folder and all its subfolders use the /recurse option. For example,
Dism /Image:C:\test\offline /Add-Driver /Driver:c:\drivers\USB3drivers /Recurse
To install an unsigned driver, use /ForceUnsigned to override the requirement that drivers installed on X64-based computers must have a digital signature. For example,
Dism /Image:C:\test\offline /Add-Driver /Driver:C:\drivers\mydriver.INF /ForceUnsigned
Review the contents of the Windows\Inf\ directory in the mounted Windows image to ensure that the .inf files were installed using Windows Explorer. Drivers added to the Windows image are named Oem*.inf. This is to ensure unique naming for new drivers added to the computer. For example, the files MyDriver1.inf and MyDriver2.inf are renamed Oem0.inf and Oem1.inf.
At a command prompt, type the following command to commit the changes and unmount the image.
Dism /Unmount-Wim /MountDir:C:\test\offline /Commit
Now run the Installer.cmd to install Windows 7 to your USB device.
I received this email from L. Douglas:
I followed the steps at the end of your tutorial and was able to get the Intel USB 3.0 drivers added in to my install.wim image.
One word of caution: Disable antivirus during this process. It blocked Dism from making the changes it needed to do.
I then was able to install to the USB HDD and it booted fine from USB 2.0 port. Unfortunately, Trying to boot from USB 3.0 port would still bluescreen.
I went into the registry after booting from USB 2.0 and changed:
HKEY_LOCAL_MACHINE -> SYSTEM -> ControlSet001 -> services -> iusb3hub
HKEY_LOCAL_MACHINE -> SYSTEM -> ControlSet001 -> services -> iusb3xhc
for both of those entries, I changed "Start" to "0" and "Group" to "Boot Bus Extender"
This will vary based on the USB3 driver in use, but this worked for the Intel USB3 drivers.