Look! - Over 40 Tutorials
RMPrepUSB - Site News

47 - How to install Windows Vista/7/SVR2K8 onto a USB drive (or any partition)

Unique hits customisable counter

2011-9-10 New version of available (fixes 'bootsect.exe not found' error).

Please note: This tutorial enables you to prepare a USB drive so that you can boot directly to Windows 7 from the USB drive. So now you can try Windows 7 without needing to install it onto your internal hard disk!

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

  1. Connect the prepared external USB drive (hard disk or Flash drive) to the target system
  2. Switch on the system
  3. Select the USB drive as the boot device in the BIOS boot menu
  4. Now allow the system to boot to Windows 7 directly from the USB drive.
    - it does not matter what is on the internal hard disk of the target system, even if the internal hard disk is broken/not working.

Watch the YouTube Video


This tutorial as based on fujianabc's 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 -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 are however confusing and potentially dangerous (you may accidentally corrupt your system drive) - so I have slightly modified the 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 or USB Flash drive) 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.

Note that there are some pitfalls with this Windows USB drive once you have successfully made it:
  • You will need to activate Windows using a valid Product Key (which will be locked to the hardware you booted it on) if you want a fully functional version of Windows for over 30 days
  • You cannot just plug the USB drive into any other system. If you want to move it to another system (once you have booted it on one system) then you need to sysprep it (see ADDENDUM at the end of this page). This is because on first boot, a fresh copy of Windows will detect what hardware is on the system and install the correct drivers (including the drivers for the boot drive). If you try to boot that USB drive on another system without running Sysprep, you may just get a BSOD (0x0000007B blue screen of death error).
  • No drivers are included in the image if a plain Windows installation DVD is used as the source DVD.
  • A USB Flash drive will be quite slow (1-2 hours!) to install and run Windows from, unless you use a fast USB 3 Flash drive, such as BUSBI Boost USB 3 (even on a USB 2 port, USB 3 Flash drives are usually faster than USB 2 drives, but not, of course, as fast as a standard USB hard drive or USB 3 drives on USB 3 ports).
Using this method, you could remove a 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. Alternatively, you could just make an external USB drive with Windows on 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.

Aim: To install a bootable Windows 7 (or Vista or Win2K8) OS onto an external USB drive.

You need to make the USB drive 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 one (see External Links page)

Equipment required:
  1. A USB hard drive of at least 10GB (which will be wiped during this process)
  2. You must have the Microsoft WAIK for Windows 7 installed (or at least the files bootsect.exe, bcdboot.exe and imagex.exe)
  3. The download from the Downloads page 
  4. A Windows 7 installation DVD (or ISO file which you can mount as a drive letter) - see here to download a copy of Windows 7.
  5. (optional) RMPrepUSB to partition the USB hard drive

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

2. You need to partition and format the target USB disk. You can use Windows to do this or RMPrepUSB. If you already have a formatted hard disk you can just use that, but the contents will be wiped by the Installer script. IMPORTANT: The USB hard disk volume must be formatted as NTFS and must be allocated a drive letter by Windows.

3. Download  (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 the folder on the hard disk is called C:\NT6Inst for the sake of this Tutorial.

4. Download and install the Microsoft Windows 7 WAIK. We only need three files from this but it is easiest to install the whole thing (see Tutorial #1 for help with this) - once installed the 3 files will be found and automatically copied to your C:\NT6Inst when you run the Installer.cmd script. 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 to the C:\NT6Inst folder.
IMPORTANT: You need to install the Windows AIK after you download the WAIK ISO file. Mount the ISO file using Virtual Cone Drive CD (or burn a DVD from the ISO) and run StartCD.exe. Then run Windows AIK Setup from the WAIK menu. You may need to also install .Net Framework and MSXML too depending on your system. 

5. Right-click on the file C:\NT6Inst\Installer.cmd and choose Run as Administrator.

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 - so 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 10 minutes for a USB 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 booted on one type of system, it will probably crash if booted on a different system as the correct drivers for the first system are installed on first boot.
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' version of Windows, do not update the version with a Service Pack update (SP1) as this could break the installation. Normal hotfixes and updates are OK though.

ADDENDUM - Booting from a different system

If you want to connect the USB drive to a different system, you may need to sysprep the drive.

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 an administrator command prompt and using 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, don't forget to run Sysprep again before you move it!

Updated on Sep 10, 2011 by Steve Si (Version 43)

Attachments (8)

NT6Install_SUMMARY.jpg - on Aug 6, 2011 by Steve Si (Version 1)

NT6Install_DLETTER.jpg - on Aug 6, 2011 by Steve Si (Version 1)

NT6Install_targetB.jpg - on Aug 6, 2011 by Steve Si (Version 1)

NT6Install_targetS.jpg - on Aug 6, 2011 by Steve Si (Version 1)

NT6Install_SKU.jpg - on Aug 6, 2011 by Steve Si (Version 1)

NT6Install_Start.jpg - on Aug 6, 2011 by Steve Si (Version 1)

NT6Install_pickwim.jpg - on Aug 6, 2011 by Steve Si (Version 1)

NT6Install_Finish.jpg - on Aug 6, 2011 by Steve Si (Version 1)