Installing Windows to an external hard drive is a bit different from installing it to an internal one. If you follow the conventional steps, you’ll encounter the error “You can’t install Windows on a USB Flash Drive using Setup.”
Microsoft did have a tool called Windows To Go (WTG) for creating portable workspaces, but it had a lot of limitations. For instance, it only supported USB drives certified for Windows To Go, external USB Hubs were not supported, and Windows To Go installations didn’t support feature updates either.
As such, Windows To Go was deprecated in Windows 10 Version 1903. You can still use it to install older Windows versions, but this is generally not a good idea from a long-term perspective.
If you want to install newer Windows versions to external hard drives without any limitations, Rufus is a great free and open-source option.
Install Windows with Rufus
Rufus is generally used to create bootable USB drives, which in turn are used to install the OS onto internal hard drives. In this case, though, we’re using it for something unconventional, i.e., installing Windows onto an external hard drive.
Aside from selecting the Windows To Go option during the initial phase, the rest of the process is mostly the same. Here are the full steps:
- Download and install a stable Rufus version if you haven’t already.
- Connect the hard drive to your PC.
- Launch Rufus and select the hard drive in the device section.
- Click on the SELECT button and locate the Windows ISO.
- Under Image Option, select Windows To Go.
- Select the Windows version you want to install.
- Enable the Prevent Windows To Go from accessing internal disks option.
- In the case of Windows 11, you can remove the requirements if necessary.
- Accept the confirmation prompt to proceed with the installation. The Windows To Go media creation will take a while. Make sure the process isn’t interrupted, as that could leave the drive in an unusable state.
- After the process is complete, restart your PC and press the BIOS key (Del or Fn keys).
- Depending on the BIOS interface, you can change the boot order or directly select the device to boot from (the USB hard drive in this case). Afterward, press F10 to save the changes and exit.
- Upon restarting, you’ll boot to the hard drive. Configure the keyboard layout, privacy choices, and other settings as you prefer to complete the setup process.
Install Windows with Windows To Go
As stated, the Windows To Go feature is mostly deprecated now due to its various limitations. However, if you want to use this anyway on older systems, there are a few things to keep in mind.
First, unlike Rufus, the hard drive needs to be a Certified WTG USB drive. This should be the only USB drive connected to your PC during the installation. Next, the Windows Image (WIM) file that you use should contain a valid Enterprise sysprep generalized image.
WTG Creator Wizard
With that said, the steps to use the Windows To Go creator wizard are listed below. As this wizard is only available on Windows 8 Enterprise clients, you can follow the command-line method listed further below in the case of other systems.
- Press Win + S, type Windows To Go, and press Enter.
- Select the USB drive on the choose drive page.
- In the choose image page, click on Add Search Location.
- Navigate to the image’s location, and press Create. Optionally, you can also use BitLocker to encrypt the drive if you want.
- The creation process can take upwards of half an hour. After it’s complete, reboot your PC and access the BIOS Setup Utility.
- Change the boot order to boot to the USB.
- Upon booting to the USB, configure the privacy and other settings to your preference to complete the setup.
CLI Method
The command-line method uses PowerShell to perform essentially the same steps as above. First, we select the USB drive, clear all data from it, and initialize it as an MBR disk. Next, we create a system partition, format the volume as FAT32, and set up the volume for use by assigning it a drive letter. Here are the initial steps for all of this:
First, ensure that only the intended USB drive is connected to your PC. Press Win + R, type powershell
, and press CTRL + Shift + Enter. Then, execute the following commands one by one in Powershell:
$Disk = Get-Disk | Where-Object {$_.Path -match "USBSTOR" -and $_.Size -gt 20Gb -and -not $_.IsBoot }
Clear-Disk –InputObject $Disk[0] -RemoveData
Initialize-Disk –InputObject $Disk[0] -PartitionStyle MBR
$SystemPartition = New-Partition –InputObject $Disk[0] -Size (350MB) -IsActive
Format-Volume -NewFileSystemLabel "UFD-System" -FileSystem FAT32 ` -Partition $SystemPartition
$OSPartition = New-Partition –InputObject $Disk[0] -UseMaximumSize
Format-Volume -NewFileSystemLabel "UFD-Windows" -FileSystem NTFS ` -Partition $OSPartition
Set-Partition -InputObject $SystemPartition -NewDriveLetter "S"
Set-Partition -InputObject $OSPartition -NewDriveLetter "W"
Set-Partition -InputObject $OSPartition -NoDefaultDriveLetter $TRUE
After the initial procedure is complete, use DISM to apply the OS image onto the system partition as such:dism /apply-image /imagefile:n:\imagefolder\deploymentimages\mywtgimage.WIM /index:1 /applydir:W:\
Next, use bcdboot to move the necessary boot files to the system partition as such:W:\Windows\System32\bcdboot W:\Windows /f ALL /s S:
The process is mostly complete, but we’ll need to create a couple of XML files before we’re done. First, create a san_policy.xml
file with the following content:
<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="offlineServicing">
<component
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
language="neutral"
name="Microsoft-Windows-PartitionManager"
processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35"
versionScope="nonSxS"
>
<SanPolicy>4</SanPolicy>
</component>
<component
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
language="neutral"
name="Microsoft-Windows-PartitionManager"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35"
versionScope="nonSxS"
>
<SanPolicy>4</SanPolicy>
</component>
</settings>
</unattend>
Navigate to the root directory of the Windows partition on the WTG drive and save this san_policy.xml
file there. Then, execute the following command:Dism.exe /Image:W:\ /Apply-Unattend:W:\san_policy.xml
Next, create an unattend.xml
file with the following content:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component name="Microsoft-Windows-WinRE-RecoveryAgent"
processorArchitecture="x86"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UninstallWindowsRE>true</UninstallWindowsRE>
</component>
<component name="Microsoft-Windows-WinRE-RecoveryAgent"
processorArchitecture="amd64"
publicKeyToken="31bf3856ad364e35" language="neutral"
versionScope="nonSxS"
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UninstallWindowsRE>true</UninstallWindowsRE>
</component>
</settings>
</unattend>
Save and copy this unattend.xml
file into the sysprep folder. Its location will generally be W:\Windows\System32\sysprep\
.
Do note that there might be a temporary unattend file in the %systemroot%\panther
folder. If there is, you should replace the previous version with the one you just created.
Once all of this is done, all that remains is to reboot your PC, boot into the USB, and complete the setup process.