Creating customized recovery images for Win8

Fred Langa

Windows 8’s easy-to-use and built-in backup, restore, and rebuild tools go far beyond those found in previous versions of Windows.

When using Win8’s Refresh option, the advanced Recimg tool can preserve your current Win8 setup — including desktop apps that Refresh would, by default, remove.

This is the fourth installment in a series detailing Windows 8’s backup-and-recover system. The previous Top Stories include:

  • July 11, “Understanding Windows 8’s File History”
  • Aug. 15, “A ‘no-reformat reinstall’ for Windows 8,” which discusses Win8’s Refresh command
  • Sept. 12, “A clean-slate reinstall for Windows 8,” a description of Win8’s clean-slate tool, Reset.

Unfortunately, in its default application, Refresh has a major drawback. Although it doesn’t change your user files, native (Metro/Modern) Win8 apps, or applications you obtained via the Windows Store, Refresh does remove traditional Windows desktop apps that you installed from other websites or from optical media. (See the explanation on a Microsoft Windows 8 Support page.)

You can, however, avoid this Refresh limitation by creating and using a custom system image. It automatically rebuilds Win8 to the specific configuration you want — standard desktop apps included.

A custom system image still gives you the benefits of the default Refresh. Win8’s core files will be completely rebuilt, and your user accounts, data, passwords, and personal files will be left intact.

Best of all, it’s incredibly simple to make a custom system image. The only tool you need — recimg.exe — is already built into your copy of Windows 8!

Recimg.exe (or Recimg for short) gets its name from a contraction of the phrase “record image,” a command-line tool. Microsoft offers instructions on using the command in support article 2748351. But those instructions leave out important details — and that’s where this article will help.

In the following steps, you’ll see how to prep your system for the best Recimg results, and you’ll learn how to use the tool and its various options. You’ll also get some extra tips and tweaks that can make the process of creating a custom system image go faster and more smoothly, including a solution to the most common problem that can interfere with Recimg’s operation.

Before you begin, some basic prep work

Because Recimg will create a custom system image based on your current Win8 setup, it stands to reason that you’ll want Windows to be as nearly perfect as it can be: complete, up to date, and error-free.

So before you begin, spend a few minutes performing some basic system maintenance:

  • Update all your software. Manually run Windows Update and ensure you’re running the latest versions of all third-party software. An automated update tool such as Secunia PSI (free/paid; site) can simplify and speed up this process. For more auto-update tools, see the July 26, 2012, Top Story, “Software that updates your other software.”
  • Run a reputable Registry cleaner to help ensure that your Registry doesn’t contain errors such as references to absent software or altered system locations. Piriform’s CCleaner (free/paid; site) is a popular tool, but there are many others — some excellent, some more trouble than help.

    Tip #1: Cleanup tools can also remove junk and trash files — generally a good thing. But Recimg doesn’t collect and preserve junk files, so junk-file cleanup is not a necessary prerequisite for running the imaging tool.

  • Verify your disk’s health using Windows’ built-in tools — either the command-line chkdsk or the GUI-based Error-checking/Check now. If you need a refresher on these apps, see the “Check the hard drive’s physical/logical health” subsection of the Jan. 10 Top Story, “Let your PC start the new year right!”

With those three basic tasks done, you’re ready to create your custom system image.

Tip #2: Recimg is CPU- and disk-intensive; it can take several hours to run to completion. If needed, you can keep using your PC because Recimg uses Windows’ shadow copy function (more info) to process files — even if they’re open, in use, or locked.

Keep in mind, however, that because Recimg makes heavy demands of your system, it will cause a noticeable slowdown.

To reduce potential frustration, and to allow Recimg to complete its task in the shortest-possible time, I suggest that you run it only when your PC would otherwise be idle and unused.

In the same vein, you can further quicken Recimg’s operations by shutting down or disabling as many background tasks as possible. For example, before running the tool, disable or postpone any scheduled backups, data syncs, malware scans, defragmentation operations, and so on.

Building your first custom system image

Using Recimg to create a custom system image is amazingly simple. Here are the steps:

  • To start, bring up an administrator-level command prompt by whatever method you prefer. In Windows 8, the easiest way is to simply press the Windows key + X (WinX) and then select Command Prompt (Admin). A standard admin-level command window will open.
  • At the command prompt, type:

    recimg /createimage {folder path}

    Note: Replace {folder path} with the path/folder name where you want the custom system image stored. For example, you might use C:\RefreshImage as the path and folder name. (If the folder doesn’t exist, Recimg will create one.) So the entire command would be:

    recimg /createimage C:\RefreshImage

    Tip #3: System images can be quite large, typically 15–25GB. Make sure the destination drive has sufficient room.

    Tip #4: To speed Recimg’s processing, create the system image on your fastest hard drive, even if you don’t want to keep it there permanently. (System images can be moved after they’ve been created; more on this in a moment.)

  • With the command, path, and folder name entered, press Enter. Recimg will go to work in three stages: initializing, creating a snapshot of the current setup, and then writing the image to the specified location, as shown in Figure 1.

    The custom system-image file is always called CustomRefresh.wim. (The extension .wim stands for Windows Imaging Medium — see the MS TechNet explanation.)

    Recimg at work

    Figure 1. A typical Recimg progress screen. Here, the tool is beginning to write an image to C:\RefreshImage.

When the custom image is fully written (typically after several hours), Recimg will register the new CustomRefresh.wim file as your system’s active system image. Windows 8 will automatically use the newly created image whenever you run Refresh on your system. (For complete information on refreshing Win8, see the Aug. 15 Top Story, “A ‘no-reformat reinstall’ for Windows 8.”)

You can run Recimg as often as you like. If you specify the same folder over and over, only the last CustomRefresh.wim will be retained. But you also can specify a different destination folder each time in order to build a library of custom system-image configurations.

You also can move CustomRefresh.wim files from wherever they were created to any other suitably capacious location — either to save space or for long-term archiving.

If you move a CustomRefresh.wim file, or if you have multiple image files you’ve created over time, use Recimg to tell Windows 8 which file should be used as the current, active system image.

Open an administrator’s command window and type

recimg /setcurrent {folder}

where {folder} is the path to and name of the CustomRefresh.wim file you wish to use as the current source of Refresh files.

Other Recimg options include:

  • recimg /showcurrent — displays the folder that holds the currently active image. It’s useful if you lose track of which CustomRefresh.wim Win8 is using.
  • recimg /deregister — enter this command if, for some reason, you want or need to return to Win8’s default system image. Refresh will use the image originally provided by the PC’s manufacturer — or, if no OEM file is available, the files on your original installation medium.

    (Using the /setcurrent command described above, you can always return to one of your custom system-image files.)

  • recimg /help — displays a list of all available Recimg commands, plus some simple help text.

Solving the most common Recimg problem

Win8’s custom system image–creation tool can occasionally be confused by virtual volumes (logical hard drives or partitions) and/or by symlinks (symbolic links; MSDN explanation).

For example, popular cryptographic software such as TrueCrypt, Boxcryptor, and others commonly create their own private volumes to hold encrypted data.

If there are any irregularities with the way those volumes are mounted or dismounted, Recimg might stop early in its initialization process and display error messages such as The recovery image cannot be written or The system cannot find the file specified. The most common error code associated with this problem is the cryptic 0x80070003.

The solution: Temporarily uninstall whatever software created the volume or symlink and then run recimg.exe. Reinstall the problematic software after the custom system image has been created. (Obviously, the problem app won’t be restored along with your other apps, if you use Win8’s Refresh.)

Win8’s multi-tiered backup/recovery options

As you’ve seen from this series, Windows 8 offers a wider range of built-in backup and recovery options than any previous version of the OS does. In summary:

  • File History provides automatic, nearly constant, always-on backups of your user data and files.
  • Reset lets you rapidly restore your PC to its original, fresh-from-the-box setup.
  • Refresh provides a quick-and-easy, nondestructive reinstall of Win8’s core files — without disturbing your user files. And when combined with a custom system image, it won’t remove apps that were not included with Windows or not purchased from the Windows Store.

Whatever your feelings about Win8’s interface, you have to agree: it’s good to have all that protection built into the base operating system!

Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 10, Windows 8, Windows 7, Firefox, Internet Explorer, Google, etc. Join our 460,000 subscribers!

Enter your email above to receive messages about offerings by Penton, its brands, affiliates and/or third-party partners, consistent with Penton's Privacy Policy.
The Windows 7, Vol 3 (Excerpt)

Subscribe and get our monthly bonuses - free!

The Windows 7 Guide, Volume 3: Advanced maintenance and troubleshooting provides advanced tools for keeping Microsoft's premier operating system up and running smoothly. Get this excerpt and other 4 bonuses if you subscribe FREE now!

= Paid content

All Windows Secrets articles posted on 2013-10-10:

Fred Langa

About Fred Langa

Fred Langa is senior editor. His LangaList Newsletter merged with Windows Secrets on Nov. 16, 2006. Prior to that, Fred was editor of Byte Magazine (1987 to 1991) and editorial director of CMP Media (1991 to 1996), overseeing Windows Magazine and others.