Good-to-know recovery in Windows 8

If you haven’t started to play around in the snow yet (in Sweden at least) and you’re stuck inside because you’re sick (like me) you can always do things like back-ups (and no I’m not talking about the exercise), and other file cleaning things…. and in Windows 8, why not create a recove Wim-file with recimg?

If you run cmd as administrator and execute

recimg /?
Configures the recovery image Windows uses to refresh your PC.
RECIMG.EXE <command> <arguments>
The recimg.exe command line tool lets you configure a custom recovery image for Windows to use when you refresh your PC.
When you create a custom recovery image, it will contain the desktop apps you've installed, and the Windows system files in their current state. 
Recovery images do not contain your documents, personal settings, user profiles, or apps from Windows Store, because that information is preserved at the time you refresh your PC.
When you create a custom recovery image, recimg will store it in the specified directory, and set it as the active recovery image. 
If a custom recovery image is set as the active recovery image, Windows will use it when you refresh your PC. 
You can use the /setcurrent and /deregister options to select which recovery image Windows will use. 
All recovery images have the filename CustomRefresh.wim. If no CustomRefresh.wim file is found in the active recovery image directory, 
Windows will fall back to the default image (or to installation media) when you refresh your PC.
Note that you cannot reset your PC using a custom recovery image. Custom recovery images can only be used to refresh your PC.
The following commands can be specified:
/createimage <directory>         Captures a new custom recovery image in the location specified by         <directory>, and sets it as the active recovery image.
/setcurrent <directory>         Sets the active recovery image to the CustomRefresh.wim file in the         location specified by <directory>. Windows will use this image when you
refresh your PC, even if a recovery image provided by your PC's         manufacturer is present.
/deregister         Deregisters the current custom recovery image. If a recovery image         provided by your PC's manufacturer is present, Windows will use that         
image when you refresh your PC. Otherwise, Windows will use your         installation media when you refresh your PC.
/showcurrent         Displays the path to the directory in which the current active recovery         image is stored.
/help, /?         Displays this help text.

So! Away we go, and might I suggest you place the recovery wim file on a different drive than your windows drive 🙂

recimg /createimage e:\recimg

If you navigate to that folder you will see that windows will create a CustomRefresh.wim file.

When it is complete execute recimg /showcurrent to view the settings.

AND if you got a little bit over excited as I did with the cleaning up files and what not’s and you tried to refresh your Windows 8 machine with Windows Recovery by pressing Shift and F8 while booting…
but all you got was “The drive where Windows is installed is locked. Unlock the drive and try again”
Refresh your PC

Well have no fear you probably just messed upp BCD so press cancel, go back to Windows Recovery, select Troubleshoot, Advanced Options and then Command Prompt and execute


and then

list volume

And note which volume letter (Ltr) that has the operating system files for Windows 8 – you better know the size of the partition 😉

then execute the following where you replace D: with the drive letter of your Windows 8 partition.

bcdboot d:\windows /s d:\

And if THAT fails you need to find out the GUID {identifier} for your installation and use that information with bcdboot to repair it.


And then use that information instead (with the driveletter of your volume as explained in the previous steps):

bcdboot d:\windows /m {2980d3a5-1dfc-11e2-a3bb-2c768ae43499}