Skip to main content This browser is no longer supported. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Deploy a Custom Image
- 4 minutes to read
In this article
In this topic you create a reference installation, capture an image of the installation, and rerun Windows Setup with an answer file that points to your custom image. Deploying a custom image using Windows Setup provides several benefits over applying an image using an image capture tool. Setup supports the following:
- Applying another answer file for additional customizations during deployment.
- Reconfiguring disk configuration.
- Adding additional drivers.
- Replacing a product key.
- Selecting a different language to install.
- Selecting from a list of images to install, if your image file contains more than one image.
- Installing to a different drive location.
- Upgrading an existing Windows installation.
- Configuring the computer to dual-boot operating systems.
- Ensuring that the hardware can support Windows.
Installing a custom image using Windows Setup has some limitations. For more information, see Windows Setup Scenarios and Best Practices.
To complete this walkthrough, you need the following:
- A technician computer that has the Windows Assessment and Deployment Kit (Windows ADK) tools installed.
- A Windows product ISO.
- A reference computer on which you will install and capture your custom image.
- Bootable Windows PE media. There are several types of Windows PE media that you can create. For more information about these options, see WinPE overview.
- Access to a network share to store your custom image and Windows Setup source files.
On your technician computer, copy the entire contents of the Windows installation media to a network share. For example:
net use N: \\server\share\ xcopy D: N:\WindowsDVD\ /s
where D: is the Windows installation media. Windows installation media could be a mounted Windows installation ISO, or a USB installation drive.
Step 2: Install Windows onto your reference computer
- Create a reference installation by using one of the following methods:
- Boot from a DVD
- Use a Configuration Set with Windows Setup
- After the installation is complete, shut down the computer.
Step 3: Capture an image of the installation
In this step, you’ll capture an image of the reference installation by using DISM and then store the custom image on a network share.
- Boot the reference computer using your bootable Windows PE media.
- At the WinPE command prompt, use DISM to capture an image of the installation. Specify a name and description as part of your image capture. All values are required by Windows Setup. If a .wim file does not include these values, then the image will not install correctly. For example:
Dism /Capture-Image /ImageFile:C:\myimage.wim /CaptureDir:c:\ /Compress:fast /CheckIntegrity /Name:"Home" /Description:"Home reference installation"
- Replace the default Install.wim on the network share with your custom image. The image must be called Install.wim. For example:
net use N: \\server\share\ copy C:\myimage.wim N:\WindowsDVD\sources\install.wim
If necessary, provide network credentials for appropriate network access.
For more information, see DISM Image Management Command-Line Options.
Step 4: Create a custom answer file
Create an answer file that points to your custom image. Answer files allow you to configure various settings in your image. This step assumes that you’ve already built an answer file and have a working catalog. To learn how to create an answer file, see Create or open an answer file.
- On your technician computer, open Windows System Image Manager.
- On the File menu, click New Answer File.
- In the Windows Image pane of Windows SIM, expand the Components node to display available settings.
- Add the following components to your answer file by right-clicking the component and then selecting the appropriate configuration pass.
Component Configuration Pass Microsoft-Windows-Setup\DiskConfiguration\Disk\CreatePartitions\ CreatePartition windowsPE Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartitions\ ModifyPartition windowsPE Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo windowsPE
Tip Expand the component list until you see the lowest setting listed in the previous table, and then add that setting to your answer file. This shortcut will add the setting and all parent settings to your answer file in one step.
- All of the settings that you added must appear in the Answer File pane. Select and configure each setting as specified in the following table.
Component Value Microsoft-Windows-Setup\DiskConfiguration
WillShowUI = OnError
DiskID = 0 WillWipeDisk = true
Extend = false Order = 1 Size = 300
Type = Primary
Extend = true Order = 2
Type = Primary
Active = true Extend = false Format = NTFS Label = System Letter = S Order = 1 PartitionID = 1
Extend = false Format = NTFS Label = Windows Letter = C Order = 2 PartitionID = 2
WillShowUI = OnError
DiskID = 0 PartitionID = 2
- In a command prompt window copy the answer file to a network location. For example:
net use N: \\server\share\ md N:\AnswerFiles copy C:\deploy_unattend.xml N:\AnswerFiles\
If necessary, provide network credentials for appropriate network access.
Step 5: Deploy the image by using Windows Setup
In this step, you will deploy your custom image from a network share onto a destination computer.
- Boot the destination computer by using your bootable Windows PE media.
- Connect to the network share that you specified in Step 4: Create a custom answer file, and then run Setup with your answer file. For example:
net use N: \\server\share N:\WindowsDVD\setup /unattend:N:\AnswerFiles\deploy_unattend.xml
If necessary, provide network credentials for appropriate network access.
You can further customize your answer file to include additional options. You can also build deployment media using the same content that’s on the network share. Deployment media provides a portable installation solution that requires no network or any additional resources. Important The media that you create is for internal deployment use only. You cannot redistribute this media.
- Windows Setup Technical Reference
- Use a Configuration Set with Windows Setup
- Boot Windows to Audit Mode or OOBE
- Add Device Drivers to Windows During Windows Setup
- Add a Custom Script to Windows Setup
Windows 10 is the biggest and most aggressive Windows rollout to date. Before you take the plunge you need to image your hard drive so, should you wish to return to the familiarity of Windows 7 or Windows 8 you can do so with the click of a button. Note: This tutorial details how to create a bit-for-bit backup (a disk image) of your current Windows system disk so that you can later restore your computer using that image. If that’s not what you’re looking for and you’d like to actually copy your disk bit-for-bit over to a brand new hard disk (a disk clone) we’d encourage you to check out our detailed tutorial on the matter: How to Upgrade Your Existing Hard Drive in Under an Hour.
Why Do I Want To Do This?
There’s nothing worse than making a major change to your PC and then finding out that change breaks your workflow (like an old app you rely on doesn’t work anymore) or it outright breaks your PC because the leap to a new operating system leaves your hardware in need of new (and as-of-yet unreleased) drivers. Over the years we’ve covered plenty of ways to use the tools built into Windows to perform snapshots, create backups, and otherwise help you to restore your computer to a prior state if your hardware upgrades or such go awry. When it comes to a change as big as jumping from Windows 7 or Windows 8 to the barely charted waters of Windows 10, however, you don’t want to rely on snapshots and rollback features to help you return to the safety of a prior version of Windows. You want the clear and precise ability to wipe the entire drive clean and restore it, bit for bit, to the exact state it was in before you even started the upgrade process. In order to do that we need to image the drive. We want a perfect pre-upgrade copy we can call upon to restore the system. This drive image will remain clean and unchanged independently of anything we do to the computer during the upgrade process and thereafter so even if we format the drives, even if we use Windows 10 for six months and decide we really don’t like it, we can turn right back around and use the image we’ve created to turn back the clock and restore our computer to the exact state it was in before the upgrade. We can’t emphasize enough how important this step is. We’ll complete it using free tools, it doesn’t cost anything (unless you need to purchase an extra drive to store the image on), and it hardly takes any time (especially when you compare it to the hassle of reinstalling your old version of Windows and reconfiguring everything).
What Do I Need?
As we highlighted in the introduction this procedure is free (unless you need an additional internal or external hard drive to house the drive image). To follow along with us today you’ll need the following things:
- The PC you wish to backup.
- A copy of Macrium Reflect Free (available for download here).
- An internal or external hard drive with enough capacity to hold the contents of the drive you wish to image.
- A USB drive to turn into a restoration drive (minimum size 1GB).
A few points of consideration before we proceed. We aren’t cloning your Windows drive onto a new bootable drive so we don’t need a fresh storage drive or a drive we can wipe. As long as you have the space you can use any drive you have on hand as long as it can hold the drive image. So, for example, if you have a 2TB external drive that you have a few hundred GB of photos backed up on, you can also use it (space permitting) to backup your Windows disk image with no risk to your photos or other data. Although we advise you to have enough space for the whole drive, in reality the disk likely isn’t full and compression will buy you some wiggle room. On our test laptop, for example, we had a 100GB SSD, 75GB of that was filled up, and the compressed image in the end was only 50GB. Still, act as if you need a 1:1 space ratio and then be happy when you don’t. Before proceeding gather together the required materials and take a moment to download and install Macrium Reflect Free.
Creating the Rescue Media
Because we are manipulating the system drive we need rescue media in order to properly restore the drive later (as we cannot simultaneously use the system drive and reload the system image). Further, good rescue media can be invaluable for troubleshooting problems down the road. Thankfully Macrium makes it incredibly simple to create a Windows PE-based rescue media tool that includes Macrium preloaded and even boots right into the restoration tool. It couldn’t be easier and if you do things correctly on the setup and imaging side of things, the restoration side of things is a walk in the park. Once you’re ready to create your restoration media, launch Macrium Reflect on select Other Tasks -> Create Rescue Media from the file bar, as seen above. The Rescue Wizard is very helpful and will not only guide you through selecting the best rescue media but will automatically download and install the files from Microsoft on your behalf. The first step in the wizard process is confirming you have the right version of Windows PE. It automatically detects the version of Windows you’re creating the rescue media on. Ideally you want the rescue media to use the version of Windows PE that shares the same base kernel as the backup version. If you’re backing up a Windows 7 machine before upgrading to Windows 10 that means you want Windows PE 3.1 (which uses the Windows 7 kernel). If you’re upgrading from Windows 8/8.1 to Windows 10 you want Windows PE 5.0 (PE 4.0 is an option but it’s not feature rich compared to PE 5.0 and the special use case for Windows PE 4.0 is very limited and definitely not within the requirements of anything we’re doing in this tutorial). If you need to change your PE version click on the button labeled “Change PE Version” at the bottom of the wizard screen. Click Next and then confirm the drivers list (by default the media thoughtfully snags needed drivers from the host Windows installation, like USB 3.0 host drivers). Click Next. Confirm that the “PE Architecture” matches your machine (it should have defaulted to the correct setting). Newer machines (made recently or in the last few years) are almost universally 64 bit. If you’re unsure you can read up on the differences between 64 bit and 32 bit (and how to check what you have) in our article HTG Explains: What’s the Difference Between 32-bit and 64-bit Windows? Click Next and you’ll be prompted to OK a download from Microsoft (typically around 500MB). Once the files from Microsoft finish downloading you’ll find yourself in the final step of the Rescue Media Wizard. Select your USB drive carefully; while the recovering media creation process doesn’t format your USB drive it does dump a bunch of files onto the disk and make some minor modifications you’ll just have to turn around and undo. When the process is complete it’s safe to eject the recovery disk (you won’t need it again until it is time to restore your system at a later date).
Cloning Your Windows Disk
This portion of the tutorial occurs on your PC before installing Windows 10. Again, for emphasis as many readers following this tutorial likely don’t routinely use disk imaging software, this step occurs on your machine before you begin the Windows 10 upgrade. Now would be a great time to do some last minute housekeeping: delete things you don’t need, run CCleaner to purge old temporary files that don’t need to live on forever in your disk image, uninstall apps you no longer want or need, and so on. When you’re ready to create a perfect copy of the disk in a tidy pre-Windows 10 state, launch Macrium Reflect. In the left-hand navigation panel of the main window select “Create an image of the partition(s) required to backup and restore Windows” as seen in the screenshot below. That link will automatically pop up Disk Image dialogue box with only the critical Windows partitions selected, as seen in the screenshot below. There are a few important things to note here. By default the tool only selects the partitions you need to actually run Windows. In the screenshot above you can see that it selected the system and OS partitions. It did not select the recovery partition or other partitions on the primary disk. If you wish to preserve the recovery partition or other partitions, you can check them and include them in the disk image. If you don’t (we really don’t care if the recovery partition is preserved) leave them unchecked. If you do, check them off. Next, select where you wish to store the image file. A local non-OS disk or a removable USB drive of suitable size is good. We stored ours on a removable USB 3.0 drive with plenty of space to spare. Click Next and you’ll be prompted to setup a backup plan for the disk. You can ignore all of these options. Macrium Reflect, even in the free version, has a very excellent automated backup system but that’s totally overkill for our needs as we’re making a one off backup. Leave the template “None”, don’t bother setting a schedule, and leave everything unchecked. Hit Next to continue on. Confirm your settings on the last page (make sure the listed operations match what you selected earlier, like copying the system and Windows disks). Click Finish. In the final screen confirm “Run this backup now” is checked and click OK. Sit back and relax as Macrium works to create the disk image. Expect to wait at least 30-60 minutes at minimum. When the process is complete you’ll have a perfect copy of your disk ready to pull out and restore the previous version of Windows. Put it in a safe place!
How Do I Restore To The Old Version?
Maybe you love Windows 10 and everything works wonderfully. We certainly never hope that someone is unhappy with an upgrade and despite all the complaints about Windows 8 we (albeit with a Windows 7 skin on things) were happy with the improvements. But not every upgrade is a match made in heaven and you might find that instabilities, non-existent drivers, or other problems hamper your enjoyment of Windows 10. In such cases you’ll need to rollback with the help of Macrium Reflect and the disk image we just created. First things first, to avoid frustration, reboot your computer and enter the BIOS (it varies from manufacturer to manufacturer, but typically you access the BIOS via F2 or F11 on the keyboard when the computer is first booting). It’s not enough to have a computer that can boot from USB, you need to check the boot order. More times than we can count we’ve had a boot disk fail because while the computer was more than capable of booting from a USB drive the USB drive option was third in the list after the physical hard disk and CDROM drive. Double check that the USB drive is at the top of the list! (Sometimes you actually need the physical USB drive inserted during the BIOS adjustment process or it won’t be detected or ordered properly). Save the changes and boot into your recovery media. The recovery media we created in the early portion of the tutorial automatically boots right to the Macrium Reflect recovery software which is more than convenient. Once it boots up look for the Restore and Image Restore tabs as seen in the screenshot below. If you’ve booted the computer with the hard drive that houses the disk image attached (either internally mounted or with the USB drive attached to the computer) it should automatically detect that the disk image is present and it matches the disk you’re about the restore via that image. If it doesn’t automatically detect don’t worry, you can browse for it. Click on the entry “Browse for an image file”. Browse for the file and select the .MRIMG file you previously created. After you load the backup image you’ll see additional information about the image file. Confirm that it is the correct image file (the name matches the one you want, the drive size and partitions match, and so on). Once you’ve confirmed it is the image you want, click the link “Restore Image” as seen in the screenshot above. You’ll be prompted to select a disk to restore your image to. Click “Select a disk to restore to…” Select carefully from the available disks. You don’t want to overwrite your secondary data hard drive when your real target is your primary system disk. Once you’ve selected the image, then click “Copy selected partitions” to copy the partitions from the image file back over to your disk. Note: Sharp-eyed readers will likely have noticed that the disk size and partition distribution between our source disk and our destination disk do not match up in the above image. Because the computer with which we conducted the steps for this tutorial (as we personally test and confirm all steps in all articles we write here at How-To Geek) would not cooperate with our capture tool during the time it was booted into Windows PE we recreated the sequence in a virtual machine expressly to create the screenshots for your reference. Please note that in the particular application we’ve using here (overwriting your existing disk with an old image) the image and the actual hard drive configuration should match up. With the disk selected (and double checked), click Next. Confirm the Restore Summary and Operation list match what you expect and then click Finish to start the process. When the restoration process is complete and the conclusion summary is displayed, you’re all done! Click on the shutdown button located in the lower left corner of the restoration user interface, remove the USB restoration drive, and confirm you wish to restart. You’ll boot back into your Windows machine and everything will be good as new and exactly like it was the day you made the image. When it comes to foolproof restoration you just can’t beat a good disk image. Before you make the leap to Windows 10 take an hour or so and make a clean disk image you can return to should you find the upgrade isn’t all it’s promised to be. READ NEXT
- › Get Windows 10 for Free After July 29th, with a Little Prep Now
- › How to Extend Windows 10’s 30-Day Limit for Rolling Back to Windows 7 or 8.1
- › How to Upgrade Your Laptop Hard Drive
- › Windows 10 is Out Today: Should You Upgrade?
- › How to Mount a Macrium Reflect Backup Image to Retrieve Files
- › Should You Use the Windows 10 Insider Previews?
- › Update to Windows 10 Headache Free With A Pre-Upgrade Checklist
- › How to Use Microsoft Excel Templates for Event Planning
How do you recover from a dead internal hard drive or SSD? Or if Windows becomes so messed up it’s useless or even unbootable? You can always reinstall Windows from scratch. But after that you must reinstall all of your programs, and then reconfigure everything. But if you have a relatively recent image backup handy, you can recover Windows, your programs, and your configurations with a few minutes’ work.
Image backup vs. file backup
An image backup copies everything on your drive, including partitions and the boot sector. It’s the only way to back up your Windows installation properly, with all of your programs and settings. Don’t confuse this with a file backup, which only copies your data files (documents, photos, spreadsheets, and so on). Of the two, the file backup is by far the most important. You can always reinstall Windows and your applications, but you can’t reinstall your business records or your family photos. You should back up data files daily. If you’re not regularly backing them up, see my 3 easy steps for getting this going. By comparison, an image backup simply saves you the major hassle of reinstalling everything. I recommend you create an image backup three or four times a year, saving it to an external hard drive. (See our roundup of best external drives if you don’t already have one.) This article focuses on Windows 10. I’ve already covered the subject for Windows 7 and 8. 1. Plug in your external hard drive—which should have enough free space to hold everything on your internal drive. (The WD My Passport 4TB is our current top pick for this purpose.) Make sure Windows can access the drive. 2. Now go to Control Panel > Backup and Restore (Windows 7)—don’t worry about the “Windows 7” label. 3. Click Create a system image in the upper left. 3. On the following screen, make sure your backup drive is selected (or conversely choose the option to back up to DVDs or a network location). 4. Hit Next, make sure your C: drive is selected (as well as any other drives you want to back up), and click the Start backup button. The backup may take a few hours. You can continue to work as it backs up. However, I prefer to start the backup at the end of the workday so it doesn’t slow anything down. When the backup is over, you’ll be asked if you want to create a System Repair Disc. If your PC has an optical drive, create the disc. If not, create a Recovery Drive: Plug in a blank flash drive, open Control Panel’s Recovery tool, click Create a recovery drive, and follow the prompts. Or follow our guide to making a recovery drive. This drive will enable you to restore your system image when the time comes.
Restore the backup
When Windows is in a seemingly hopeless condition, you’ll need to get into the recovery environment to restore the image. Here are three ways to do that:
- If you can still boot into Windows: Select Start > Settings > Update & security. Select Recovery in the left pane, then select Restart now.
- If Windows won’t boot and you have a System Repair Disc: Insert the disc into your optical drive and boot your PC. When you’re asked to “Press any key…,” press any key. Then pick a language.
- If Windows won’t boot and you have a Recovery Drive: Insert the Recovery flash drive into a USB port and boot your PC. If your PC skips the flash drive and attempts to boot Windows, reboot and enter your Setup screen (F2 usually works; if it doesn’t, check your manual). Look for a boot or boot order option. Once you’ve successfully booted the flash drive, select a language.
Once you’re in a recovery environment, select Troubleshoot, then System Image Recovery. Follow the instructions.
- How to send messages on tiktok without a phone number
- How to teach special education kids
- How to wear sea bands
- How to find if someone is following you on twitter
- How to treat upper respiratory infections in ferrets