I am mainly writing this to document my process for doing a base install of Windows 8. I seem to go through this process several times a year and I don’t really feel like relearning this. Because I tend to reinstall more often than the average user, I prefer to make the process of migrating files between installs as painless as possible. I do this by keeping all of my files on a seperate data partition. This allows me to swap out operating systems without the need to worry about losing files. It even allows me to share my files across multiple operating systems in a dual boot setup and a virtualization setup. This is especially handy since I regularly depend on Windows and Linux for my development.
Installing Windows 8
For starters, we will need two main partions; one for Windows and one for your files. You should allocate anywhere between 50GiB and 100GiB, depending on how many programs you typically install, for the Windows partition. The remainder of your disk can be used for files. The data partition is assumed to be drive letter E for the remainder of this writeup. Change it as neccessary.
I find it easiest to allocate space for Windows at the front of your drive, followed by any other OSs you plan to install, leaving the remainder of the drive for your data partition. Once you have the drive laid out, delete the partiton you set aside for Windows. This will mark it as free space which the Windows installer will use to create the utility partition (100MiB) and the system partiton (the remainder of the space). Run through the remainder of the Windows 8 installation, stopping once you see the “Personalize” page.
At this point, reboot into audit mode by pressing CTRL+SHIFT+F3. This Konami Code will cause Windows to boot into a built-in administrator account. This account can be used to configure Windows before any user accounts have been created and that’s exactly what we are going to do. Once the machine has logged in to audit mode (you should see the metro interface at this point), click Desktop to show the traditional Windows desktop. You should see the System Preparation Tool dialog. Close it for now by pressing cancel.
Next we are going to create a System Preparation Answer file. These are typically used by SysAdmins to deploy configurations to a large number of machines. We will be using it to move our User Profile to the data partition that we created earlier. Save the following answer file to your data partition (call it move.xml):
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" 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"> <FolderLocations> <ProfilesDirectory>e:\\Users</ProfilesDirectory> </FolderLocations> </component> </settings> </unattend>
Some things worth noting:
- Change the processorArchitecture attribute as neccessary (amd64 for 64 bit machines and x86 for 32 bit machines).
- Change the ProfilesDirectory element to the desired location. I prefer to have it on the root of my data partition.
After you have saved the answer file, open PowerShell and run the following
\Windows\System32\Sysprep\sysprep.exe /audit /reboot /unattend:E:\move.xml.
This will launch Sysprep, which will apply our
settings and reboot the machine back into Audit mode.
Once the machine has booted back into Audit mode, click on desktop to return to the classic desktop. The Sysprep tool should have started again. This time, set the “System Cleanup Action” to “Enter Out-of-Box Experience (OOBE)”, set the “Shutdown Options” to “Reboot”, and press OK. This will reboot your machine back into the first-boot setup where you will need to enter your product key and personalize your machine.
After finishing the installation and setup, you’ll notice that there is no C:/Users directory. It has been moved to E:/Users! Congradulations, your user profile is now independant of your Windows installation. This will allow you the flexibility of reinstalling Windows in the future without wiping out your documents and settings.