Friday, 31 July 2015

Solution to error 0x80240020: Upgrade to Windows 10

So the whole “delete the contents of the downloads directory” thing didn’t work for me.

Today I noticed a tweet linking to an article, which in turn referred to a post in the Microsoft forums.

Apparently, the error 0x80240020 is not an indication of any download corruption – just that you’re computer is in a “holding pattern” waiting for the green light from Microsoft, as they’re staging the upgrade process. I think it would have been preferable to have just had this sitting quietly on my computer, rather than littering my Update History with “Update failed” messages.

So if you don’t want to wait, there’s a registry key you can set. (Instructions for setting registry key repeated here from the forum post)

  1. Locate the registry key: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade]

  2. It should exist, but if not, create it.

  3. Create a new DWORD (32-bit) Value with Name = "AllowOSUpgrade” (without the quotes), and set the Value = 0x00000001.

Now go back to the Windows Update in Control Panel, and tada – a new screen appears!

Windows Update in Control Panel, prompting to Get started

Click on the Get started button and things start happening..

It thinks for a short time, then the Windows Update prompt appears on your desktop:

Dialog prompting to start the upgrade now

And back in the Control Panel, you’re also prompted to restart. Clicking Start the upgrade now, or Restart now both do the same thing

Windows Update in Control Panel, prompting to restart

Your computer reboots, and the upgrade proceeds.

After a little while, and a few reboots later, you now have Windows 10!

About Windows 10 dialog


Wednesday, 29 July 2015

Installation Failure: Windows failed to install the following update with error 0x80240020: Upgrade to Windows 10 Pro.

Update – Note that this didn’t work for me. Still waiting to find a workaround, otherwise I’ll try using an ISO instead

Eagerly waiting for Windows 10 to upgrade my PC.. But nothing was happening. I noticed this error in the Event Viewer System Log:

“Installation Failure: Windows failed to install the following update with error 0x80240020: Upgrade to Windows 10 Pro.”

This thread suggests the cause may be a corrupt download.

The solution (repeated here):

  1. Delete the contents of C:\Windows\SoftwareDistribution\Download
  2. Open an elevated Command Prompt and run
    wuauclt /updatenow
  3. Go to Control Panel | Windows Update and click Check for updates.

After a minute or two, you’ll notice some new files appear in the Download folder, and the Windows Update status will change similar to this:

Downloading Windows 10

I’ll update this post if there’s anything else that requires attention to complete the upgrade successfully.

Later that same day…

Windows Update - Preparing for installation

and even later…

The installation failed with the same error Sad smile

Tuesday, 28 July 2015

Little Lunch

Just been watching a few episodes of this new TV series Little Lunch with the kids.

Hilarious! Can’t stop gigglingSmile

I did need to explain to the youngest that “little lunch” is another name for what they call “recess” (the mid-morning break my kids have at school).

Australian viewers can watch all the episodes on ABC iView.

Monday, 27 July 2015

Windows Phone Podcast apps

It seems such a simple thing to want:

  1. A podcast app
  2. One that doesn’t crash (too much)
  3. Can list and play episodes in most recent order
  4. Can download in the background

You’d think?

Way back in the day, Windows Phone 7 to be specific, podcasts were supported natively in the operating system. Except if you didn’t live in the USA. For some never explained reason, they never enabled this feature for non-US phones. Bizarre.

If I recall correctly, the original Windows Phone 8 was no different, but then eventually Microsoft released the Podcast feature as a separate app – “podcasts”.


It is a very basic app. Unfortunately I think that some of the developers of alternate podcast apps seemed to have given up when the official app came out – even if their own efforts had more features.


Carboncast app screenshotwp_ss_20150725_0007

One of the first apps I tried on WP8 was Carboncast. The layout and design still impress me, but sadly it proved quite unreliable (and no background downloads). Unfortunately the developer apparently lost interest too – the last update was December 2013.


This was my next app of choice for a fair while. It aims to be more like the original built in app (as it was released before that app was made available to the rest of the world).

Podcaster app screenshotwp_ss_20150725_0005

Background downloading was added in later versions, though I had occasional trouble with corrupted downloads.

Podcast+ Pro

Podcast+ Pro app screenshot

I then moved to this app – Podcast+ Pro. Pretty good, but no background downloading.

Podcast Lounge

Podcast Lounge app screenshotwp_ss_20150725_0010

I came across this one earlier this year (I think someone recommended it on Twitter) and had been using it until recently. It is quite good, but alas it didn’t do background downloads. A recent release supposedly added this feature, but the implementation appears to be buggy as it never worked for me.

A few issues also with strange ordering of episodes and frustration with episodes previously ‘marked as played’ reappearing as unplayed. Feedback emails were sent, but no responses.


Castcenter app screenshotwp_ss_20150725_0008

And so, another search of the store to see if there was anything else worth trying and I came across “Castcenter”. A free app, but you need to pay (in-app purchase) to unlock managing more than three podcasts. You can create custom playlists, and it does background downloads.

So far so good.

If you’re into podcasts and have a Windows Phone, let me know what app are you using?

Thursday, 23 July 2015

Moving VHDs for a virtual machine in Hyper-V on Windows 8.1

I’ve been using virtual machines to test out some software, but those VHD files take up a bit of disk space – so much that my PC’s solitary SSD drive was running out of room. Thankfully the Lenovo hard disk drive bracket kit arrived today so I can install an extra drive to supplement the SSD.

Now to move the VHD files to the new drive.

The instructions described here, whilst for Windows Server are essentially the same for a Windows desktop OS. The only difference is that the Move Wizard doesn’t offer the Move the virtual machine option. eg.

Hyper-V Move Wizard dialog on Windows 8.1

Of course, you can do this with PowerShell too (and I did):

Move-VMStorage -VMName W12R2-1 -DestinationStoragePath d:\VHDs\W12R2-1

And you even get a nice progress bar!

PowerShell console showing Move-VMStorage with progress

You also get the migration progress in the status field in Hyper-V Manager.

Hyper-V Manager with VM showing Moving Storage status

A few minutes later, the VHD was successfully moved to my new hard disk, and because this happened live, the VM kept running the whole time. Impressive!

Wednesday, 22 July 2015

PowerShell and (not) parsing command lines

A short reminder note for myself.

To tell PowerShell to not parse the remainder of a line, use --%. This is invaluable when calling out to external commands and you don’t want to escape every special character with a backtick (`).

So instead of this:

icacls X:\VMS /grant Dom\HVAdmin:`(CI`)`(OI`)F

You can write this:

icacls X:\VMS --% /grant Dom\HVAdmin:(CI)(OI)F

See the Stop Parsing section in Online Help for more info.

Monday, 20 July 2015

Glimpse and Castle Windsor

Some breaking news in the last week – Microsoft has taken over the sponsorship of Glimpse – an open source diagnostic platform for web applications. Glimpse has been described as the server-side equivalent of your browser’s F12 Developer Tools, so it’s great that first Red Gate and now Microsoft have recognised the value of this tool and supported its development.

I’ve been making use of Glimpse recently to get some more insight into the timing of server-side code. It hooks into the ASP.NET pipeline and gives a useful breakdown of various activities. Depending on what you’re using with your web application, there’s extra extensions that you can add to glean more information – like Web Forms, Entity Framework etc.

Even for things like an Inversion of Control Container can provide interesting data. There’s already extensions for AutoFac and Ninject, but not for Castle Windsor – one of my preferred IoC containers.

I know that there are quite extensive diagnostics provided by Castle’s container – but usually you only see these when you’re debugging, so I thought it might be possible to expose the same information to Glimpse.

And so I created the Glimpse.Castle extension.

It adds a new tab to to the Glimpse dashboard with all that useful detail from the Castle container’s diagnostics service.

Web browser showing Glimpse dashboard

The extension source code is on Github and currently you can build it and run with the latest release of Glimpse. When I get a chance I’ll get it published on NuGet and get it added to the extensions page on the Glimpse website.

Saturday, 18 July 2015

Visual Studio 2015 Launch

Set your alarm clocks because the Visual Studio 2015 launch begins at 20th July 2015 15:30 UTC. (That’s 1am Tuesday morning if you live in Adelaide).

Or you can enjoy a good night’s sleep and watch the recordings on Channel 9 at a more sensible time Smile.

Either way, I’m definitely looking forward to the final RTM of VS 2015 – I’ve been using the Release Candidate version on and off over the last month or two and there’s definitely some nice enhancements.