Refresh Windows 8 - Create and Use Custom Recovery Image

How to Create a Custom Recovery Image to Use to Refresh Windows 8 and 8.1

information   Information
This tutorial will show you how to create and register a custom recovery image to use instead of default when you refresh your Windows 8, Windows RT, Windows 8.1, and Windows 8.1 RT PC.

You must be logged in as an administrator to be able to do this tutorial.

Quoted from Microsoft:

Refreshing your PC to a state you define, including desktop apps

We know that many of you like to first configure your PC just the way you like it, by installing favorite desktop apps or removing apps that came with the PC, and then create an image of the hard drive before you start using the PC. This way, when you need to start over, you can just restore the image and you won’t have to reinstall the apps from scratch.

With this in mind, we’ve made it possible for you to establish your own baseline image via a command-line tool (recimg.exe). So when you get a Windows 8 PC, you will be able to do the following:
  • Go through the Windows first-run experience to configure basic settings.
  • Install your favorite desktop apps (or uninstall things you don’t want).
  • Configure the machine exactly as you would like it.
  • Use recimg.exe to capture and set your custom image of the system.
After you’ve created the custom image, whenever you refresh your PC, not only will you be able to keep your personal data, settings, and Metro style apps, but you can restore all the desktop apps in your custom image as well. And if you buy a PC that already comes with a recovery image on a hidden partition, you’ll be able to use the tool to switch from using the hidden partition to instead use the custom image you’ve created.

Note   Note
The recimg.exe command line tool lets you configure a custom recovery image for Windows 8 to use when you refresh your PC. When you create a custom recovery image, it will include the desktop apps you've installed and the Windows system files in their current state. Saved recovery images do not include your documents, personal settings, user profiles, or modern apps from the Store because that information will automatically be included by default at the time you refresh your PC. This way when you refresh your PC with the saved custom recovery image, it will save and include your current documents, personal settings, user profiles, and modern apps.

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 8 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.






STEP ONE

To Create and Register a Custom Recovery Image


1. After you have finished seting up Windows 8 how you like it, open a elevated command prompt.​
2. In the elevated command prompt, copy and paste the command below, and press Enter. (see screenshot below step 3)​
NOTE: If you like, you can subsititute the C drive letter in the command below for the drive letter of the location that you would like to keep the CustomRefresh.wim recovery image file at instead.​
recimg -CreateImage C:\RefreshImage
Tip   Tip
If needed, you can press the ESC key at anytime to cancel creating this custom refresh image.
3. When finished, this new custom recovery image of your current Windows 8 setup will now be set (registered) as the current active recovery image used whenever you refresh Windows 8 next in STEP TWO below.​
NOTE: It may take a bit to finish creating your custom recovery image. At the Writing image line the progress stays at 1% for a bit and then increases slowly until finished at 100%.​
CMD.jpg
Tip   Tip
You can create multiple or new recovery images every so often to have an updated version handy if you should need to refresh your PC with.

Whenever you create a new recovery image, the new image will be used instead by default afterwards since it will be the latest registered (set) active recovery image.
Note   Note
To unregister this custom recovery image for refresh to have Windows 8 go back to using it's default refresh, see: How to Deregister the Current Custom Recovery Image to Refresh Windows 8

To set a previosly created CustomRefresh.wim recovery image file to be used by refresh, see: How to Set a Custom Recovery Image as Active to Use to Refresh Windows 8






STEP TWO

To Refresh Windows 8 with the Custom Recovery Image


1. If you have not already, you must have already previously created and registered a custom recovery image using STEP ONE first to use to do the refresh with.​
2. You can now use either option in the tutorial below to refresh Windows 8 like you would normally do so, but your custom system image will now be used to refresh Windows 8 with instead.​


That's it,
Shawn


 

Attachments

  • Refresh.png
    Refresh.png
    608 bytes · Views: 410
Last edited:
it contained complete Pagefile, Swapfile and Hiberfile elements in the archive. I thought that .wim files filtered out such data.

How did you look at the .wim contents ? I thought 7zip would, but doesn't open it here.
 

My Computer

System One

  • OS
    win8.1
    Computer type
    Laptop
    System Manufacturer/Model
    lenovo
Here's a curious thing which I don't understand.

I left my laptop running to create a Custom image yesterday evening, but due to Power settings, the computer went into Sleep mode in the middle. I woke the computer up and it seemed to finish normally, without mentioning any error messages.

However I wondered if something might have gone wrong, so I ran it again in a different folder (being sure to keep it awake this time). The curious thing is that the file sizes were very different. First one was over 8GB but the second one was about 1GB less. Why are two images such different sizes?

I ran it a third time and the file size is again different; it's similar to the 2nd run but not the same.

It occurred to me that my anti virus software is set to updated its signatures at a time between the 1st and 2nd runs, but I can't see how that would be as much as a GB, and it doesn't explain why the 3rd one is different.

File sizes are:
  1. 8,298,759 KB
  2. 7,272,486 KB
  3. 7,301,183 KB

Why does the file size vary?
 

My Computer

System One

  • OS
    Windows 8.1, 10
Wow.. I just had the same deal sort of.. Laptop went to sleep before finishing making the wim. I stopped it with the ESC or what it says.. then restarted it. My older wims have always been 7gb .. new one is 9gb.

I sort of had been blaming that extra 2gb on fooling with the tile programs looking for a digital clock tile and news ticker for that 'Tiled start screen' . Wouldn't think those two things would add 2gb
 

My Computer

System One

  • OS
    win8.1
    Computer type
    Laptop
    System Manufacturer/Model
    lenovo
Wow.. I just had the same deal sort of.. Laptop went to sleep before finishing making the wim. I stopped it with the ESC or what it says.. then restarted it. My older wims have always been 7gb .. new one is 9gb.
Thanks for that - glad it's not just me!
it contained complete Pagefile, Swapfile and Hiberfile elements in the archive. I thought that .wim files filtered out such data.
Aha - this may be a clue - maybe the Hiberfile etc. are bigger if the computer has been to sleep during the process?
How did you look at the .wim contents ? I thought 7zip would, but doesn't open it here.
I found this tutorial shows how to open a Windows 7 .wim file:
WIM File - Extract and Modify - Windows 7 Support Forums

I'm just trying to download its Windows 8 equivalent which I think is somewhere in this mega-download here...
Download: Windows Assessment and Deployment Kit (ADK) for Windows® 8 - Microsoft Download Center - Download Details
 

My Computer

System One

  • OS
    Windows 8.1, 10
Think win8 already has what you need to mount a wim. I just haven't read enough to feel comfortable using it.
DISM /? command
 

My Computer

System One

  • OS
    win8.1
    Computer type
    Laptop
    System Manufacturer/Model
    lenovo
Hello David and Mikie,

Most likely the extra amount may be from the other custom recovery image unless you deleted it first.

If you like, you could also use 7-Zip 9.30 alpha to view and extract from a WIM file.
 
Last edited:

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
I just deleted the custom .wim .. clean disk system , cccleaner , fresh restart ... still 9gb here. maybe I try the alpha 7zip
 

My Computer

System One

  • OS
    win8.1
    Computer type
    Laptop
    System Manufacturer/Model
    lenovo
Think win8 already has what you need to mount a wim. I just haven't read enough to feel comfortable using it.
DISM /? command
Great - thanks for that.

So here's what I did. I should mention that I did all this with copies of the .wim files, on another PC that I didn't mind breaking!

I created a blank folder at C:\TestMount\offline, and copied my CustomRefresh.wim files into three different subfolders of C:\WIMsTest

Then I went to elavated command prompt, navigated to C:\TestMount and used these commands
Code:
Dism /Mount-Image /ImageFile:C:\WIMsTest\FirstFolder\CustomRefresh.wim /index:1 /MountDir:C:\TestMount\offline /ReadOnly

Dir offline /s /a-d /on >DirAttempt1.txt

Dism /UnMount-Image /MountDir:C:\TestMount\offline /Discard
Then I repeated it with "FirstFolder" changed to the second and third folders, and "DirAttempt1.txt" changed to Attempt2 and Attempt3

You can also use this instead of the Dir command, but I preferred Dir as it shows the times and dates and sizes of files:
Code:
Dism /List-Image /ImageFile:C:\WIMsTest\FirstFolder\CustomRefresh.wim /index:1 >ListImage1.txt

And the results. Well around the last line of the output from Dir command, which shows the final totals of files and folders, it looks like this for my three files:
  1. 78934 File(s) 21,980,305,301 bytes
  2. 78936 File(s) 21,983,887,347 bytes
  3. 78951 File(s) 21,958,309,340 bytes
... which are all pretty much the same.

I also used 3rd party utility KDiff3 to compare the contents of the files. There were some changes due to anti-virus updates, and a few changes within the Microsoft folders, but no huge files of 1GB or thereabouts.

So I'm still none the wiser about file sizes. Unless I've missed something in my DIR command, the actual files in the image are the same when you mount them; perhaps it's a compression issue.

But I have learned more about DISM as a result of the exercise. :)

Edit: Just in case anyone's wondering (like I was) what "mounting" a image in DISM means... I created a real blank folder on my disk, and by mounting the .wim file at that location, it appears as if the folder holds the contents of the .wim image, even though I'm pretty sure the files are not there on the physical disk (in fact not even on the same disk in my case). I'm pretty sure it's wise to un-mount when finished, and by using the readonly flag when I mounted and the discard flags when I unmounted, hopefully I didn't change anything.
 
Last edited:

My Computer

System One

  • OS
    Windows 8.1, 10
Well how cool is the "new refresh?" Verrrrrrrrrrrrrrrry! Never saw this tutorial before.
 

My Computer

System One

  • OS
    Win7 Ult on DIY; Win8 Pro on MBP/Parallels; Win7 Ult on MBP/Boot Camp; Win7 Ult/Win8 Pro on HP
    Computer type
    PC/Desktop
    System Manufacturer/Model
    DIY Rig; MacBook Pro (MBP)/Parallels/Boot Camp; HP Pavilion dv6500t Laptop
    CPU
    Intel i7-2600K (sometimes OC'd to 4.8 GHz)
    Motherboard
    ASUS P8P67 Deluxe Rev B3
    Memory
    16 GB Corsair Vengeance
    Graphics Card(s)
    EVGA 570 SC
    Monitor(s) Displays
    Gateway
    Hard Drives
    Dual Boot:
    Win7 Ult RAID 0 on OCZ Revo x2 and
    Win7 Ult RAID 0 on Caviar Black SATA 3's
    PSU
    Cooler Master Silent Pro 1000W
    Case
    Cooler Master 932 HAF
    Cooling
    Zalman CNPS9900MAX-B CPU Fan
    Keyboard
    Logitech Cordless Desktop MX 5500
    Mouse
    Logitech Cordless Desktop MX 5500
    Internet Speed
    20 Mbps Download/2+ Mbps Upload
    Other Info
    Pioneer Blu-ray Burner/DVD Burner
I shrunk my RefreshImage.wim this morning to a more normal size by first running the disk clean/system/more tab and clean up System Restore and 'Shadows Copies' Changed showing 43gb to 38gb used on C:\
The extra shadows copy's seem to add to the size. I think :)
 

My Computer

System One

  • OS
    win8.1
    Computer type
    Laptop
    System Manufacturer/Model
    lenovo
Great news Mikie. Thank you for posting back with your results. :)
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
How could I miss that, but better late than never. That's all I needed to avoid that annoying software reinstall after a refresh.

Thanks Shawn !

:)
 

My Computer

System One

  • OS
    Windows 10.0.10122
    Computer type
    PC/Desktop
    System Manufacturer/Model
    My Build - Vorttex Ultimate
    CPU
    Core i7 @ 4500 MHz
    Motherboard
    ASUS Z87-Plus
    Memory
    32GB DDR3 @ 1822 MHz (OC)
    Graphics Card(s)
    Radeon R9 280X 3GB @ 1180 / 6800 MHz
    Sound Card
    7.1 HDA
    Monitor(s) Displays
    LCD LG 22" + CRT LG 17"
    Screen Resolution
    1760 x 1320 / 1280 x 960
    Hard Drives
    1 x 240 GB SSD (System)
    3 x 500 GB HDD (Data/Media)
    1 x 2000 GB e-HDD (Backup)
    PSU
    ThermalTake 1000W PSU
    Case
    Corsair Carbide R300
    Cooling
    Corsair H60 (Push-Pull)
    Keyboard
    Microsoft Wireless Keyboard
    Mouse
    Microsoft Wireless Mouse
    Internet Speed
    60 Mbps (Down) 5 Mbps (Up)
    Browser
    IE, FF, Chrome
    Antivirus
    AVG Internet Security 2015
    Other Info
    Some wired stuff
error code 0x80042301 from attempt

ok i tired to do this, entered cmd entered the request then i received this error code, 0x80042301 as the recovery could not be completed, any ideas on how i may be able to accomplish the recovery? thanks from mexico
 

My Computer

System One

  • OS
    win 8
    Computer type
    Laptop
    System Manufacturer/Model
    asus

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
hola from mexico, i now have a refresh image i followed yoru tutorial, excellent by the way. I want to refresh my system win 8 pro. if i do a refresh now that i do have the refresh image, all of my former programs will be maintained. Is that correct? Do I need to do anything differently to begin the refresh? if this works I will be a very happy man.

on another note, on my other PC with win8 i cannot connect to the internet from the metro start page, i always receive cannot connect to the internet Although i am connected from the desktop. very frustrating. i have tried dozens of suggestions, even a refresh. nada works. thanks
 

My Computer

System One

  • OS
    win 8
    Computer type
    Laptop
    System Manufacturer/Model
    asus
refresh image

ok thanks for the speedy reply, v s c is set to automatic. is this ok? so is all is well and i do a refresh win 8 will read the c:\refreshimage and not delete my program files? well i thought i had a refresh image but, i was 57% through and i received this error code
0x80070006 if it isn't one thing it is another.
 
Last edited:

My Computer

System One

  • OS
    win 8
    Computer type
    Laptop
    System Manufacturer/Model
    asus
If it failed again with that error, then how much free space is on the drive/partition that you are trying to save the custom refresh image to?

Please go ahead and also post a screenshot showing the full layout of your Disk Management (diskmgmt.msc).
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
trying again 230 gigs free

ok stopped at the same place. 57% i am about to give up on win 8, i have two computers both now with win 8 they had win 7 and i NEVER had as many problems in years of use as i do with win 8 and that is in three months. the os i feel is just not ready, may never be. a vista 2??!!!.. i am working on my newer computer to communicate. the other with the problem writing to the file just crashed AGAIN. this is just such a drag.. so when i have a chance, if is do, i will send a file with the screen shot. thanks. and about the win store not connecting any ideas? that is the problem on this computer.

the reason i am doing a refresh is that i cannot log on. i arrive at the lock screen then around and around goes the spinning oval.. arpound and around... i have done a chore to try and resolve the issue but none work. SOOOOOO a refresh. I learned for trying to refresh this computer that I do not want to refresh without some backup. days to re install my programs.. so there you have two computer both disasters with win 8.
 
Last edited by a moderator:

My Computer

System One

  • OS
    win 8
    Computer type
    Laptop
    System Manufacturer/Model
    asus
ok failed twice more times stopped at 47% this time after a serious removal of unused programs... attached is the desktop image of the disk mang.

desk top.png
 

My Computer

System One

  • OS
    win 8
    Computer type
    Laptop
    System Manufacturer/Model
    asus
Cisco,

The problem is that when you restore a refresh image, it will restore your entire Windows 8 to how it was when the image was created.

In your case, it would restore the same cannot logon issue. :(
 

My Computer

System One

  • OS
    64-bit Windows 10
    Computer type
    PC/Desktop
    System Manufacturer/Model
    Custom self built
    CPU
    Intel i7-8700K OC'd to 5 GHz
    Motherboard
    ASUS ROG Maximus XI Formula Z390
    Memory
    64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz (F4-3600C18D-32GTZR)
    Graphics Card(s)
    ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
    Sound Card
    Integrated Digital Audio (S/PDIF)
    Monitor(s) Displays
    2 x Samsung Odyssey G7 27"
    Screen Resolution
    2560x1440
    Hard Drives
    1TB Samsung 990 PRO M.2,
    4TB Samsung 990 PRO PRO M.2,
    8TB WD MyCloudEX2Ultra NAS
    PSU
    OCZ Series Gold OCZZ1000M 1000W
    Case
    Thermaltake Core P3
    Cooling
    Corsair Hydro H115i
    Keyboard
    Logitech wireless K800
    Mouse
    Logitech MX Master 3
    Internet Speed
    1 Gb/s Download and 35 Mb/s Upload
    Browser
    Internet Explorer 11
    Antivirus
    Malwarebyte Anti-Malware Premium
    Other Info
    Logitech Z625 speaker system,
    Logitech BRIO 4K Pro webcam,
    HP Color LaserJet Pro MFP M477fdn,
    APC SMART-UPS RT 1000 XL - SURT1000XLI,
    Galaxy S23 Plus phone
Back
Top