﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.ucis.nl/index.php?action=history&amp;feed=atom&amp;title=Install_Windows_7_on_an_USB_disk</id>
	<title>Install Windows 7 on an USB disk - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.ucis.nl/index.php?action=history&amp;feed=atom&amp;title=Install_Windows_7_on_an_USB_disk"/>
	<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=Install_Windows_7_on_an_USB_disk&amp;action=history"/>
	<updated>2026-04-30T07:20:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=Install_Windows_7_on_an_USB_disk&amp;diff=96&amp;oldid=prev</id>
		<title>Admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=Install_Windows_7_on_an_USB_disk&amp;diff=96&amp;oldid=prev"/>
		<updated>2022-11-09T14:49:53Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:49, 9 November 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>http://wiki.ucis.nl/index.php?title=Install_Windows_7_on_an_USB_disk&amp;diff=95&amp;oldid=prev</id>
		<title>Admin: Created page with 'This article will guide you through the process of creating a bootable Windows 7 USB disk. Not for installing Windows 7, but for actually running Windows 7 from the USB disk. No ...'</title>
		<link rel="alternate" type="text/html" href="http://wiki.ucis.nl/index.php?title=Install_Windows_7_on_an_USB_disk&amp;diff=95&amp;oldid=prev"/>
		<updated>2010-10-26T14:49:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;This article will guide you through the process of creating a bootable Windows 7 USB disk. Not for installing Windows 7, but for actually running Windows 7 from the USB disk. No ...&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This article will guide you through the process of creating a bootable Windows 7 USB disk. Not for installing Windows 7, but for actually running Windows 7 from the USB disk. No virtualization tricks, just a real portable Windows 7 disk.&lt;br /&gt;
&lt;br /&gt;
== Installing Windows 7 onto the USB device ==&lt;br /&gt;
First, you'll need to get Windows to install itself on the USB device. This is normally not possible, but there are a few hacks.&lt;br /&gt;
&lt;br /&gt;
* If you want to install Windows on an USB harddisk, you can remove the harddisk from it's USB casing and install it directly in your computer. You can then install Windows 7 on the disk.&lt;br /&gt;
* Alternatively, you can use some virtualzation software (like VMWare or VirtualBox) to 'attach' the USB device as a virtual SATA disk to a virtual machine, and install Windows 7 inside the virtual machine, onto the USB device.&lt;br /&gt;
&lt;br /&gt;
I'll use VirtualBox to install Windows on my portable USB harddisk. I use Ubuntu Linux on my laptop, so the commands used here may be Linux specific - but Windows equivalents exist!&lt;br /&gt;
&lt;br /&gt;
# First, I create a 'raw disk' vmdk virtual harddisk file, using the following command: VBoxManage internalcommands createrawvmdk -filename USBDisk.vmdk -rawdisk /dev/sdb -register&lt;br /&gt;
#* This command needs to be run as root (Administrator for windows)!&lt;br /&gt;
#* USBDisk.vmdk is the filename of the virtual harddisk file we're creating, that will map to the physical device&lt;br /&gt;
#* /dev/sdb is the physical device we want to use. Make sure that you use the right drive here, as you might otherwise erase your existing operating system!!!&lt;br /&gt;
#* Windows has a different notation for the physical drive notation. It's somewhere in the VirtualBox manual. Google is your friend.&lt;br /&gt;
# Then, still as root/Administrator, we create a new virtual machine with sufficient RAM, and attach the newly created .vmdk image to the machine, and attach a Windows 7 installation media to the machine.&lt;br /&gt;
# Start the Virtual Machine and proceed the installation as usual.&lt;br /&gt;
&lt;br /&gt;
== Configuring Windows 7 to boot from the USB device ==&lt;br /&gt;
Normally, Windows 7 would not boot from anything it doesn't recognize. This includes USB devices. To fix this, we'll have to run a few commands, as Administrator, on our new Windows 7 installation:&lt;br /&gt;
# bcdedit /set {default} detecthal on&lt;br /&gt;
# usbbootfix.bat (see below for the contents of this file!)&lt;br /&gt;
# StorageBootStart.bat (see below, this is optional, will slow down the boot process but make it a lot more portable!)&lt;br /&gt;
&lt;br /&gt;
=== usbbootfix.bat contents ===&lt;br /&gt;
Copy the text below into a new notepad document and save it as usbbootfix.bat. Make sure to select &amp;quot;All files (*.*)&amp;quot; for the file type!&lt;br /&gt;
&amp;lt;pre&amp;gt;@echo off&lt;br /&gt;
if &amp;quot;%1&amp;quot;==&amp;quot;fix&amp;quot; goto :fix&lt;br /&gt;
&lt;br /&gt;
rem -- install task&lt;br /&gt;
copy /y &amp;quot;%~f0&amp;quot; &amp;quot;%SystemRoot%\system32\usbbootfix.bat&amp;quot;&lt;br /&gt;
SCHTASKS /Create /RU SYSTEM /SC ONEVENT /MO &amp;quot;*[System[Provider[@Name='Microsoft-Windows-UserPnp'] and EventID=20003]]&amp;quot; /EC System /TN USBBootFix /TR &amp;quot;'%SystemRoot%\system32\usbbootfix.bat' fix&amp;quot; /F&lt;br /&gt;
rem -- apply other settings&lt;br /&gt;
reg add HKLM\SYSTEM\CurrentControlSet\services\pciide /v Start /t REG_DWORD /d 0x0 /f&lt;br /&gt;
reg add HKLM\SYSTEM\CurrentControlSet\services\msahci /v Start /t REG_DWORD /d 0x0 /f&lt;br /&gt;
reg add HKLM\SYSTEM\CurrentControlSet\services\intelide /v Start /t REG_DWORD /d 0x0 /f&lt;br /&gt;
reg add HKLM\SYSTEM\CurrentControlSet\services\viaide /v Start /t REG_DWORD /d 0x0 /f&lt;br /&gt;
rem -- run :fix once after install&lt;br /&gt;
&lt;br /&gt;
:fix&lt;br /&gt;
call :fixservice usbehci &amp;quot;Boot Bus Extender&amp;quot;&lt;br /&gt;
call :fixservice usbohci &amp;quot;Boot Bus Extender&amp;quot;&lt;br /&gt;
call :fixservice usbuhci &amp;quot;Boot Bus Extender&amp;quot;&lt;br /&gt;
call :fixservice usbhub  &amp;quot;System Bus Extender&amp;quot;&lt;br /&gt;
call :fixservice usbstor &amp;quot;SCSI miniport&amp;quot;&lt;br /&gt;
goto :eof&lt;br /&gt;
&lt;br /&gt;
:fixservice&lt;br /&gt;
setlocal&lt;br /&gt;
set Start=&lt;br /&gt;
set Group=&lt;br /&gt;
for /f &amp;quot;skip=2 tokens=1,2,*&amp;quot; %%I in ('reg query HKLM\SYSTEM\CurrentControlSet\services\%~1') do (&lt;br /&gt;
  if &amp;quot;%%I&amp;quot;==&amp;quot;Start&amp;quot; set Start=%%K&lt;br /&gt;
  if &amp;quot;%%I&amp;quot;==&amp;quot;Group&amp;quot; set Group=%%K&lt;br /&gt;
)&lt;br /&gt;
if not &amp;quot;%Start%&amp;quot;==&amp;quot;0x0&amp;quot; reg add HKLM\SYSTEM\CurrentControlSet\services\%~1 /v Start /t REG_DWORD /d 0x0 /f&lt;br /&gt;
if not &amp;quot;%Group%&amp;quot;==&amp;quot;%~2&amp;quot; reg add HKLM\SYSTEM\CurrentControlSet\services\%~1 /v Group /t REG_SZ /d &amp;quot;%~2&amp;quot; /f&lt;br /&gt;
endlocal&lt;br /&gt;
goto :eof&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== StorageBootStart.bat ===&lt;br /&gt;
Copy the text below into a new notepad document and save it as StorageBootStart.bat. Make sure to select &amp;quot;All files (*.*)&amp;quot; for the file type!&lt;br /&gt;
&amp;lt;pre&amp;gt;@echo off&lt;br /&gt;
setlocal&lt;br /&gt;
set saveundo=^&amp;gt;^&amp;gt;StorageBootStart_Undo.bat echo &lt;br /&gt;
%saveundo% @echo off&lt;br /&gt;
for /f &amp;quot;skip=1 tokens=1-5 delims=^&amp;amp;&amp;quot; %%I in ('reg query HKLM\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase') do (&lt;br /&gt;
 if not .%%I==. call :checkcdd %%I %%J %%K %%L %%M&lt;br /&gt;
)&lt;br /&gt;
endlocal&lt;br /&gt;
goto :eof&lt;br /&gt;
&lt;br /&gt;
:checkcdd&lt;br /&gt;
set key=%1&lt;br /&gt;
if not .%key:~0,18%==.HKEY_LOCAL_MACHINE goto :eof&lt;br /&gt;
if not .%2==. set key=%1^&amp;amp;%2&lt;br /&gt;
if not .%3==. set key=%1^&amp;amp;%2^&amp;amp;%3&lt;br /&gt;
if not .%4==. set key=%1^&amp;amp;%2^&amp;amp;%3^&amp;amp;%4&lt;br /&gt;
if not .%5==. set key=%1^&amp;amp;%2^&amp;amp;%3^&amp;amp;%4^&amp;amp;%5&lt;br /&gt;
set class=&lt;br /&gt;
set service=&lt;br /&gt;
for /f &amp;quot;skip=2 tokens=1,2,*&amp;quot; %%I in ('reg query &amp;quot;%key%&amp;quot;') do (&lt;br /&gt;
  if /i &amp;quot;%%I&amp;quot;==&amp;quot;ClassGUID&amp;quot; set class=%%K&lt;br /&gt;
  if /i &amp;quot;%%I&amp;quot;==&amp;quot;Service&amp;quot; set service=%%K&lt;br /&gt;
)&lt;br /&gt;
if .==.%service% goto :eof&lt;br /&gt;
if /i &amp;quot;%class%&amp;quot;==&amp;quot;{4D36E96A-E325-11CE-BFC1-08002BE10318}&amp;quot; goto :storage&lt;br /&gt;
if /i &amp;quot;%class%&amp;quot;==&amp;quot;{4D36E97B-E325-11CE-BFC1-08002BE10318}&amp;quot; goto :storage&lt;br /&gt;
goto :eof&lt;br /&gt;
&lt;br /&gt;
:storage&lt;br /&gt;
set /a knowsv=knowsv_%service%&lt;br /&gt;
if %knowsv%==1 goto:eof&lt;br /&gt;
set knowsv_%service%=1&lt;br /&gt;
set start=&lt;br /&gt;
for /f &amp;quot;skip=2 tokens=1,2,*&amp;quot; %%I in ('reg query HKLM\SYSTEM\CurrentControlSet\services\%service% /v Start') do (&lt;br /&gt;
  if /i &amp;quot;%%I&amp;quot;==&amp;quot;Start&amp;quot; set /a start=%%K&lt;br /&gt;
)&lt;br /&gt;
echo %service% %start%&lt;br /&gt;
if &amp;quot;%start%&amp;quot;==&amp;quot;0&amp;quot; goto :eof&lt;br /&gt;
%saveundo% echo %service% %start%&lt;br /&gt;
%saveundo% reg add HKLM\SYSTEM\CurrentControlSet\services\%service% /v Start /t REG_DWORD /d %start% /f&lt;br /&gt;
reg add HKLM\SYSTEM\CurrentControlSet\services\%service% /v Start /t REG_DWORD /d 0 /f&lt;br /&gt;
goto :eof&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Many thanks go to ==&lt;br /&gt;
After spending a few hours on google, I finally found this thread on http://www.boot-land.net/, containing everything needed to make Windows 7 boot from an USB device. To make sure that this information is not lost, and to make it more accessible, I've written this article.&lt;br /&gt;
* Original thread: http://www.boot-land.net/forums/index.php?showtopic=9196&lt;br /&gt;
* usbbootfix.bat: http://www.boot-land.net/forums/index.php?s=ebc64b196dd29fd2ee357788df9197ab&amp;amp;act=attach&amp;amp;type=post&amp;amp;id=10315&lt;br /&gt;
* StorageBootStart.bat: http://www.boot-land.net/forums/index.php?s=ebc64b196dd29fd2ee357788df9197ab&amp;amp;act=attach&amp;amp;type=post&amp;amp;id=10316&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>