Nov 252013
 
 November 25, 2013  Posted by at 11:44 am Windows  Add comments
WP_20131125_012-1024x5761-300x300

I couldn’t sleep last night. The first night back home after US I slept for 13 hours and honestly thought I had managed to escape the dreaded jetlag (I seem to adjust fairly well usually when crossing time zones). But last night, probably after too much energy from the evening workout, I woke up after a mere 2 h sleep and couldn’t sleep anymore. So I got up, did laundry, folded clothes, unpacked, cleaned, and made a backup of my computer and a fresh install.

I also made a custom image of my computer since I had the setup I wanted, so I easily could remove everything and reset to that state on regular basis. How? With ‘Refresh PC’.

Windows 8 introduced a new feature that few seem to be aware of, called Refresh PC. I tend to re-install every 3-6 months to clean out my computer, and I’ve used different ways to make the process less painful. Now I’ve found what at least seems like the perfect way. Once I automate this it will be perrrrfect.

When you want to ‘refresh’ your computer you have two options, the first one – the most dramatic one is to reset your computer to factory settings. Awesome. Not too sure about that. This means bye-bye to everything, Windows Store Apps, other apps, files, settings and what not. Since the dirty little secret that nothing is really deleted until you write over the data, you’ll have the option to do that. Like somebody erasing something you wrote with an eraser, but you can still see the dents from the pen, but if somebody scribbled over it a few times, it would become unreadable. Kind of like that.

Refresh your PC with a custom image

Refresh your PC with a custom image

The second option is to just Refresh your computer, an invigorating treatment like a facial mask. You get to keep your personal files ( and even if some disappear they will still be in a bloated folder called ‘Old’ (which you should remove once you are sure you have everything you need unless you want a large chunk of that precious space to be taken up by that folder). You also get to keep ALL of your precious Windows Store Apps, I know how much you love them. But not the desktop apps.

Wait. What?

Not the ‘real’ apps? The ones that take AGES to download and you’ve misplaced the product keys and… And… Fear not. Of course you can keep them, it just requires some work from you, and somebody (me) telling you how to do this. Now, I cannot guarantee that this will work, so always make backups, shit happens, we all know that. It can be your fault, OS fault, karma, but never me. I have disclaimers so I’m in a safe place. But I have tried this, and according to the well hidden documentation, this is how it is done.

There is something called

recimg.exe

This neat little tool will be your buddy in this process. This program will help us make an image, a copy of the state of the PC as it is right when you make it, and then allow us to use the image to refresh the PC. The image is specific to the computer and the hardware and OS it runs.

Open PowerShell as an admin by searching for ‘powershell’, and type

Refresh your PC with a custom image

recimg /ShowCurrent

Result:

There is no active custom recovery image.

Error Code – 0x80070490

It will tell you there is no custom image, and that is true. But there is an image, if you were to refresh without one it would use the default one, which is made with all the crapware/bloatware that came with your PC and the current OS install.

You probably want to clean up everything nicely before you make a custom image, like tidying up at home before you have guests over. Imagine if we could make an image of that and use that to refresh? Would totally rock.

So let’s make a mage then.

Go to where you want to create that directory, use ‘cd ..’ to navigate a level up, paste the full path or write the full path or navigate by ‘cd andThenTypeWhere’. ‘cd’ stands for ‘change directory’- and not that silvery little place we used to ‘backup’ movies and music to.

mkdir /NameOfFolder

This will make a new directory (Mk-dir, get it?) with the name you give it after the slash.

Now we can create the image by using:

Recimg /CreateImage c:\NameOfFolder

Give it some time. Listen to the soothing fans of your computer purring to the recimg tool. Have a coffee. Go for a run. Its a PC after all, we don’t rush. It can easily take 30 mins plus, and sometimes it shows 1% for almost 30 minutes before it ‘suddenly’ finishes. Never trust the progress numbers, give it some time.

2013-11-25 09-37-50

Think you are ready to go? No, not yet. You do have an image, but your computer doesn’t know of it. So you need to set it as current.

recimg /SetCurrent  c:\NameOfFolder

Run the recimg /ShowCurrent command again to check that the image is there

2013-11-25 09-38-12

NOTE!- There are many third party tools you can use instead, some free, some not, some automated, some not (you can make your own script to automate the process of course). I don’t have any experience with those, yet. But once I do, I will write up an article about them, and compare. I do notice some love-hate reviews of this Windows 8 feature, so you might want to spend some love on the search engine and dive in some forums and find alternatives if this isn’t working for you.

If you try to move the image on a non-fixed disk you would get:

The recovery image cannot be registered. The recovery image must be stored

on a fixed disk.

Error Code – 0x80004002

=> So don’t do that

To refresh (and there are a few ways to do this) you select ‘Refresh PC’ – this can be done by starting to type refresh in the Modern UI mode and the option should appear in the charm-bar-menu-whatever-this-column-is-called.

Refresh your PC with a custom image

Let’s watch my ‘refreshing’, done just a few hours ago, at 4 am in the morning before work 🙂

WP_20131125_007

WP_20131125_008

WP_20131125_010

WP_20131125_012

WP_20131125_014

The result? All the apps worked fien, except:

Had problems with Snagit and Camtasia, Snagit needed a repair and Camtasia a reinstall. They seem to be storing files in on of the system folders that is being cleaned out. I’m going to email them about this.

2013-11-25 09-35-27

I installed WinDirStat after the image was made so I could see if the refresh worked (it shouldn’t keep the program since it’s not a part of the image)

As you can see it was indeed removed. It’s BTW an awesome tool that lets you see how space is being used on your computer.- get it!

Stupid Question 228- 229: Why don’t I have any free disk space left? And what is a disk usage analyzer?

2013-11-25 10-00-16

Some desktop shortcuts re-appeared, and I had to reinstall GitHub for Windows and Chrome Canary – but I was ‘warned’ about the two desktop apps, and they were found in Windows.Old

2013-11-25 09-55-37

2013-11-25 10-03-56

That folder is by the way massive, and you need to remove it once you’ve made sure you have everything you need. It’s easier said than done, a simple admin delete on the folder wont work, and Remove-Item C:\Windows.old* -recurse in PowerShell won’t do the trick either. Instead you should run the Disk Cleanup Manager , just run the cleanmgr command, and give it half a minute and the windows will appear. Select ‘Previous Windows Installations’ and click OK, and in a tiny few moments you will have removed the trash, ahhhh!

How to delete Windows.old

How to delete Windows.oldv

There we go, you have ‘refreshed’ your PC, and your live, and you can live happily ever after – or until it’s that time again, time to do some spring cleaning. Recimg and cleanmgr will be waiting for you.

  2 Responses to “Refresh your PC with a custom image (step by step guide)”

  1. Excellent write up Iris

    Twitter: @ChadWst

  2. Maybe it’s quicker/easier to reinstall Win8.1 from an USB-stick? Takes me about 12 minutes, but after this you’d have to reinstall all apps and data. On the other hand, this is a complety fresh installation = quick. I’m not sure how the Win8 license works though. I haven’t seen any license key numbers on the Win8 OEM computers?

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

What is 11 + 13 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)