How to Create Hardware Independent System Image for Installing Windows 10
InformationIn this tutorial we will prepare a Windows 10 image customizing the default user profile and install software we want to include in a clean Windows installation. When everything is as we want we will generalize the image, making it totally hardware independent. This image can then be used to install (deploy) Windows 10 to any hardware setup, any physical or virtual machine capable to run Windows. You can create the image on a Windows running on Parallels virtual machine on a Mac, take the image and use it to install Windows on your new desktop.
Default User Profile is stored in a hidden folder in main profile folder Users. When a new user is created, either when installing Windows or any time later, Windows uses this default profile as base for the new user profile. As you might know Windows does not create the user folders for a new user instantly when the user account is created; instead the user profile folder is first created when the new user signs in to Windows first time. This is why the first sign in to a new user account takes a bit longer, Windows needs some time to copy the default profile to new user profile and create the user.
In this tutorial we do the customization in so called Audit Mode. It is a special mode of Windows, allowing us to interrupt Windows installation to customize and install all software we want to include in image before any user accounts are created. When finished, we run Windows System Preparation Tool (Sysprep) to generalize the image. Generalizing removes all hardware related information and drivers from the image making it universal, hardware independent. When finished we create a system image containing our image and instead of installing Windows on a new computer traditionally we simply restore the image. Notice that this is much faster than installing; the same computer that requires 20 minutes to install Windows from a DVD needs less than 10 minutes to restore an image containing not only the full Windows OS but also the software we included in image. (Times from "test for fun" I did a few hours ago, installing Windows on an i5 / 6GB desktop and directly thereafter wiping the HDD and restoring an image I had created earlier.)
Although this procedure as described in this tutorial contains some advanced methods and commands, it is in fact quite an easy task. Doing as instructed, following the tutorial to the letter, there's no reason why a user with quite basic knowledge of Windows couldn't make it.
Please post any questions and concerns in this thread.
TipTo get better screenshots I did this on a Hyper-V virtual machine running on Windows 10 Tech Preview. Using a virtual machine as reference computer is easy, images which will be created are exactly the same except one very positive thing: a Windows installation on a virtual machine is smaller than the same installation on a physical computer, so an image created on a vm is also smaller.
If interested check this tutorial for creating a Windows vm on Hyper-V: Hyper-V virtualization - Setup and Use in Windows 10
NoteIn this tutorial we will use the free Macrium Reflect imaging software to create our system image and later deploy it (install) to another computers. Before you start, download Macrium, install it on any computer and create the Macrium Rescue Disk as instructed when you launch Macrium first time.
You can of course use any third party imaging software you are familiar with, or the Image-X from Microsoft. If you decide to use Macrium, my esteemed fellow geek Wolfgang has made an easy to follow tutorial which you'll find at our sister site The Seven Forums: Imaging with free Macrium - Windows 7 Help Forums.
If creating the Macrium Rescue Media causes problems, see this excellent tutorial by Colin, another fellow senior geek: http://www.sevenforums.com/tutorials...usb-drive.html.
Part One: Install Windows
Part Two: Customize Default User Profile
Part Three: Create an Unattended Answer File
Part Four: Run Sysprep
Part Five: Create the system image
Part Six: Deploy (install) Windows using your customized image
Part OneInstall Windows, enter Audit Mode
1.1) Boot your computer or virtual machine normally from a valid Windows install media
1.2) Follow the steps in our installation tutorial until you reach Step 12 and see this screen:
1.3) Do not click any buttons nor press Enter. Instead press CTRL + SHIFT + F3 (press and hold down both CTRL and SHIFT keys, press F3, release all keys)
1.4) Windows reboots now entering a so called Audit Mode using the built-in administrator account. When Windows Desktop will be shown you'll notice the System Preparation Tool dialog in the middle of your screen. Close it for now by pressing the Cancel button:
Part TwoCustomize Default User Profile
2.1) You can now change the Windows colors, sounds, wallpaper and theme, icon placing and folder view options. You can set Internet Explorer home page and favorites, install applications and so on
2.2) For this tutorial I did the following customizations (numbers in screenshot, see explanations below):
- Placed shortcuts for Mail and News app and PC Settings to desktop
- Installed VLC Player and Office 2013 Professional. As Office 2013 can be installed without a product key which is first asked when one of the programs in Office suite is launched first time, it can be included in this image and only needs a product key when image is deployed to a computer and its user wants to use Office. If user does not need or want Office, it can then be easily uninstalled. Placed VLC and Office shortcuts to bottom left
- Set Explorer icon view = large icons, set ribbon to be shown, added Libraries to Explorer left pane tree view
- Added my favorite forums to IE favorites
- Changed the default homepage to
- Changed the wallpaper and theme colors
2.3) You can change and customize quite a lot but there are a few things that can't be set now for default user profile. Pinned Taskbar icons and Start Menu / Start Screen items for instance will not be copied to default user profile. A rule of thumb: You can customize everythin related to themes, fonts, colors, sounds, icons, desktop and IE. You cannot customize anything on Start Menu and Taskbar.
Part ThreeCreate an Unattended Answer File
3.1) We are almost ready. We just need a so called Unattended Answer File, a set of instructions in an XML script file to tell Sysprep what we want it to do. An answer file must follow strict syntax rules and it contains all command we want to pass to Sysprep in order to modify the Windows image as we want to.
I have prepared the answer file needed for this procedure. Copy and paste the below code to a new file in Notepad:
Change the following details if needed (see the parts in red in above code):Code:<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="specialize"> <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"> <CopyProfile>true</CopyProfile> </component> </settings> <cpi:offlineImage cpi:source="wim:X:/sources/install.wim#Windows TECHNICALPREVIEW" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
- The value of variable ProcessorArchitecture must be "amd64" if you are installing a 64 bit Windows regardless of if you have an Intel or AMD processor, and "x86" if you are installing a 32 bit Windows
- The value in CopyProfile tags must be True if you want the customizations to be copied to default user profile
- On the last line of code, change the location of Windows 10 install media. In this example the media is on drive X:
- Following the install media location, separated with #, see that you have the Windows version correctly (Windows TECHNICALPREVIEW for Windows 10 Tech Preview). Notice that the installation media must be present when we continue with Sysprep!
TipFor advanced users:
I like to use Sysprep and an answer file to completely relocate the main user profile folder Users to another disk, to save space on C: drive. The method is described more in-depth in tutorial here but if you want to, you can easily add the relocation commands to above answer file. See the below example answer file, the lines in red are the additional lines needed in order to tell Sysprep to move the C:\Users to D:\Users. This answer file would not only customize the default user profile but also move the complete Users folder to another drive:
The new location of the Users folder must be told in <ProfilesDirectory>D:\Users</ProfilesDirectory> tags, in this case D:\Users.Code:<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="specialize"> <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"> <CopyProfile>true</CopyProfile> </component> </settings> <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>D:\Users</ProfilesDirectory> </FolderLocations> </component> </settings> <cpi:offlineImage cpi:source="wim:D:/sources/install.wim#Windows TECHNICALPREVIEW" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>
3.2) Save the file as an XML file to root of any drive except C:. In this example I save the answer file there as D:\customize.xml:
3.3) Close the Notepad
Part FourRun Sysprep
4.1) Press WIN + X, select Command Prompt (Admin). To ensure that WMP Network Sharing Service is stopped, give the following command:
net stop wmpnetworksvc
The service is most probably not running but if it is, it will now be stopped. When this service is running, Sysprep fails.
4.2) Now the Sysprep command itself. Type the following:
%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:d:\customize.xml
The above command tells system to run the Sysprep from Windows\System32\Sysprep folder reading instructions from the unattended answer file D:\customize.xml, generalize Windows (remove all hardware related information), prepare the computer for an OOBE boot (OOBE = the first boot of newly installed Windows)and finally shutdown the computer when ready:
4.3) Hit Enter, you will see Sysprep starting to do its magic and when done, shutting down the computer:
Part FiveCreate the system image
5.1) Boot your reference computer we just sysprepped with your Macrium Rescue Disk (or use any other imaging software you are familiar with)
5.2) If your reference computer uses BIOS, see the screenshot for what to include in image:
5.3) If your reference computer uses UEFI, see the screenshot for what to include in image:
5.4) Create the system image as instructed in respective user guides and tutorials for the imaging software of your choice
5.5) Shutdown the computer. If you reboot it now letting it boot from the hard disk, Windows will continue the installation from where we left it in Part One Step 1.2
Part SixDeploy (install) Windows using your customized image
6.1) To install or rather deploy (a fancy geek word meaning installing Windows from a premade image) Windows to any other computer using the customized image you have to boot the PC in question with Macrium Rescue Disk and use the image restoration feature. If you made the image using another imaging solution, use the sam software for restore.
6.2) When the image is restored, reboot the computer and it will continue from the point told in Part One Step 1.2. No user accounts exist, Windows is "virgin" like after a clean install, with one big difference: When you arrive at Desktop first time you'll notice that all customizing we did in Audit Mode is there. The apps you installed, theme and colors, icons there where you put them, wallpaper, everything.
See the screenshot in Part Two Step 2.2 and compare it to this screenshot after I have restored the image:
- Shortcuts for Mail and News app and PC Settings are where we placed them
- Installed apps VLC Player and Office 2013 Professional there, shortcuts exactly where we placed them
- Explorer icon view = large icons, ribbon shown, added Libraries in Explorer left pane tree view, exactly as set in Audit Mode customization
- Favorites as we set them, homepage
- If you did as told in the tip for advanced users in Part Three Step 3.1, the main profile folder has been moved to D:
6.3) Last check: Let's create a new local user and login to that account. As we can see, everything really works as we wanted, the new user has all the customizations in his profile as the screenshot shows (I just moved the app shortcuts to show the Start Menu):
6.4) Notice that the synchronization settings of a Microsoft Account override all other customizations. When a Microsoft Account is used to sign in to Windows 10 and following settings are enabled, they override all other customizations:
Customizations work only if the above sync settings are disabled, and on all local user accounts.
That's it, you have now created a customized Windows image and can use it instead of usual install media to install Windows 10 Technical Preview to any computer.
- How to Create a System Image in Windows 10
- How to Create and Restore a System Image Backup with Macrium Reflect
Sweet and saved