Tag Archives: windows 7

Restoring a system image backup on Windows 7 when system recovery fails

I was asked to look at a laptop over the weekend. It was an HP running Windows 7 Home Premium, and the user was having problems installing applications. I noticed several things about it:

  • Lots of utilities like registry cleaners, system care, driver accelerator and more were installed
  • When I tried to remove the third-party firewall and use the Windows firewall instead, the Windows firewall could not be fully enabled
  • Most applications could not be removed using Control Panel – Programs and Features
  • Right-clicking a network connection and choosing Properties gave an error

When Windows is in this kind of state it makes sense to reinstall from scratch. There was an intact recovery partition, so I backed up the data and ran system recovery. This seemed to go fine until right at the end, when it gave an error and invited me to contact HP support. Oddly, if I chose HP’s “Minimized Image Recovery” I still got an error, but it got me a working “Windows Basic” installation, but Windows Basic is not much use because of some arbitrary limitations Microsoft imposed.

Now I had a problem, in that the system recovery had successfully removed the old Windows install, but had failed to install a new one.

One solution would be to re-purchase Windows or try to get recovery media from HP, but before going down that route, I decided to use a system image backup that had been made earlier. There was a backup from a year or so ago on a USB hard drive. I booted using a Windows 7 DVD, chose Repair your computer, then System Image Recovery.

Unfortunately Windows refused to list the backed up system image, even though it was in the standard location under WindowsImageBackup. Since the backup was not listed, it could not be restored.

Fortunately there is another approach that works. A system image backup actually created a virtual hard drive (.vhd) for each of the drives you select. You can zap the contents back onto the real hard drive to restore it.

This HP has three partitions. One is a small system partition used for booting, one is the main partition (C drive) and one is the recovery partition. The main partition is the one that matters. Here is what I did.

First, I installed Drive Snapshot, a utility I’ve found reliable for this kind of work.

Next, I plugged in the USB drive and found the .vhd file. These are located in WindowsImageBackup\[NAME OF PC] and have long names with letters and numbers (actually a GUID) followed by .vhd. The old C drive will be the largest file (there are usually at least two .vhd files, the smaller one being the system partition).

Step 3 is to mount the vhd so it looks like a real drive in Windows. You do of course need a working Windows PC for this; even Windows Basic will do, or you can use a spare PC. I opened a command prompt using Run as administrator and ran DISKPART. The commands are:

select vdisk file=”path\to\vhd\filename.vhd”

attach vdisk

I generally leave DISKPART open so you can detach the vdisk when you are done.

When you enter “attach vdisk” an additional drive will appear in Windows Explorer. This is your old drive. You can copy urgent documents or data from here if you like.

The goal though is to restore your PC. Run Drive Snapshot or an equivalent utility.


Choose Backup Disk to File. Select your old drive and back it up to an external USB drive. I hesitate to mention it, but you also need to keep the drive with the .VHD on it attached for obvious reasons! You can back up to that same drive if there is room.

Once complete, go back to DISKPART and enter:

detach vdisk

Now you need to use Drive Snapshot to restore your old hard disk. I was lucky in this case; I could run the utility in Windows Basic on the laptop itself and restore it from there. Drive Snapshot is smart enough that you can even restore the drive where it is running, after a reboot. You could also use pretty much any old version of Windows, no need to activate it, just to run the utility.

After the restore I was able to boot Windows and all was well, apart from the hundreds of Windows Updates needed for an OS that was a year out of date. In some cases though you might need to go back into system recovery to repair the boot configuration; it usually does that pretty well.

Windows XP Mode hassles for Windows 8 upgraders

One of the reasons for the success of Windows 7 was the provision Microsoft made for customers stuck with applications that only run on Windows XP. Windows XP Mode is a free add-on for Windows 7 Professional that runs Windows XP. It can also hide the XP desktop and run individual applications in their own window, though this is cosmetic and merely hides the desktop. Windows XP Mode uses Virtual PC as its virtualisation platform.

What would expect to happen if you upgraded Windows 7 with XP Mode to Windows 8? Without having researched it, my expectation was that Windows XP Mode would migrate smoothly to Hyper-V in Windows 8.

Not so. Here is the official word:

With the end of extended support for Windows XP in April 2014, Microsoft has decided not to develop Windows XP Mode for Windows 8.  If you’re a Windows 7 customer who uses Windows XP Mode and are planning a move to Windows 8, this article may be helpful to you.  
When you upgrade from Windows 7 to Windows 8, Windows XP Mode is installed on your machine, however Windows Virtual PC is not present anymore. This issue occurs because Windows Virtual PC is not supported on Windows 8. To retrieve data from the Windows XP Mode virtual machine, perform the steps listed in the More Information section.

If you were relying on XP Mode to run some old but essential application, this is definitely worth knowing. Microsoft’s guidance on retrieving the data is unlikely to be much use, since the reason you use XP Mode is to run applications rather than to store data. Some users are not impressed:

This is SHOCKING.  I was using Win 7 Pro and had a fully configured (hours of work) XP Virtual Machine with my complete web development environment in it.  It didn’t even occur to me that it wouldn’t work on Windows 8.  I’ve only just discovered now when I tried to access it to do some updates!

I MUST recover this virtual PC.

Why did the Upgrade Advisor not mention this!?!?  I carefully resolved all the issues highlighted there before moving on.

Of course it is desirable to move off Windows XP completely, even in XP Mode, but the rationale is that it is better to be on a recent and supported version of Windows and to run XP in a virtual environment, than to run Windows XP itself.

Another oddity is that you can run Windows XP on Hyper-V in Windows 8. However you cannot get XP Mode to work unless you perform a repair install that changes the way it is licensed. Yes, it is licensing rather than technical reasons that blocks the XP Mode upgrade:

Note: The Windows XP Mode virtual hard disk will not work on Windows 8 as Windows 8 does not provide the Windows XP Mode license. The Windows XP Mode license is a benefit provided on Windows 7 only.

Users have discovered workarounds. Aside from the repair install mentioned above, you can also use Oracle Virtual Box and trick XP Mode into thinking that it is running on Windows 7 and Virtual PC. You can also run a virtual instance of Windows 7 and run XP Mode within that.

Hassles with Intel RAID – Rapid Storage Technology

I have recently fitted a new Intel DH67CL motherboard and decided to use the on-board RAID controller to achieve resiliency against drive failure. I have four 1TB Sata drives, and chose to create two separate mirrors. This is not the most efficient form of RAID, but mirroring is the simplest and easiest for recovery, since if one drive fails you still have a complete copy ready to go on its mirror.

I thought this would be a smooth operation, especially since I have two pairs of identical drives. Everything was fine at first, but then I started to get system freezes. “Freeze” is not quite the right word; it was more an extreme slowdown. The mouse still moved but the Windows 7 64-bit GUI was unresponsive. I discovered that it was possible eventually to get a clean though time-consuming shutdown by summoning a command prompt and waiting patiently for it to appear, then typing shutdown /s. After reboot, everything was fine until next time, where next time was typically only a few hours.

I was suspicious of the RAM at first and removed 8GB of my 16GB. Then I discovered that others had reported problems with Intel RAID (also known as RST) when you have two separate arrays enabled. The symptoms sounded similar to mine:

When the second RAID array is enabled (tried both RAID1 and 0), Windows (Win 7 Ultimate 64bit) will freeze after 10+ minutes of use. This initially manifests itself as my internet “going out”. While I can open new tabs in the browser, I cannot connect. I can’t ping via CMD either. I can’t open Task Manager, but I can open Event Viewer (and nothing really is shown in there re: this). If I try to Log Off or Restart the PC via Start Menu, Windows hangs on the “Logging Off” or “Shutting Down” screen for at least 10 minutes, up to several hours (or indefinitely).

There is no solution given in the thread other than to remove one of the arrays.

The system is 100% stable when I remove the second RAID1.

says one user.

I broke both of the mirrors and used the system for a while; everything was fine. I found an updated driver on Intel’s site (version, dated 17th October 2011) and decided to re-try the RAID. Now I had another problem though. Note that I was using the Windows management utility, not the embedded utility which you get to by pressing a special key during boot, since it is only with the Windows utility that you can preserve your data when creating a new array. My problem: I could not recreate the arrays.

Problem number one was that the drive on Sata port 0 disappeared when you tried to create an array. All four drives looked fine in the Status view:


but when you went to create an array, only three drives appeared:


Following a tip from the Intel community discussion board, I removed and reinstalled the RST utility, following which I also had to reinstate the updated driver. Now the drive reappeared, but I still could not recreate the arrays. I could start creating one, but got an “unknown error.” Looking in the event log, I could see errors reported by IAStorDataMgrSvc: FailedToClaimDisks and FailedVolumeSizeCheck. Curious, especially as I had used this very same utility to create the arrays before, with the same drives and without any issues.

Just as an experiment, I booted into Windows XP 64-bit, which I still have available using Windows multiboot. I installed the latest version of the Intel storage driver and utility, and tried to create a mirror. It worked instantly. I created the second mirror. That worked instantly too. Then I booted back into Windows 7 and checked out the RST utility. Everything looks fine.


The further good news is that I have been running with this for a few days now, without any freezes.

Is it possible that the latest driver fixed a problem? There is no way of knowing, especially since Intel itself appears not to participate in these “community” discussions. I find that disappointing; community without vendor participation is never really satisfactory.

Postscript: Note that I am aware that Intel’s embedded RAID is not a true RAID controller; it is sometimes called “fakeraid” since the processing is done by the CPU. Using Intel RST is a convenience and cost-saving measure. An alternative is Windows RAID which works well in my experience, though there are two disadvantages:

1. Intel RAID performs slightly better in my tests.

2. Windows RAID requires converting your drives to Dynamic Disks. Not a big problem, but it is one more thing to overcome if you end up doing disaster recovery.

File operations in Windows: the good and the bad, the past and the future

Microsoft’s Windows chief Steven Sinofksy has posted details of what file operations look like in Windows 8. There are a few changes, including a consolidated view of all current file operations that lets you pause and resume any of them. You can also click for more details and get a pretty graph.


Microsoft has also worked on the conflict resolution dialog, the one that says “Copy and Replace”, “Don’t copy”, and “Copy, but keep both files”. I consider this a pretty good dialog, but the new one adds the ability to inspect the actual files or even open them to check which is which.

A few observations. First, file operations are hard to get right from a usability perspective. I guess we have all had the experience of trying to help a non-technical user over the phone with some operation like, say, downloading a zip file, extracting it, and doing something with the contents. A common problem is that the user cannot find what they downloaded. Then they are not sure whether they did download it, and do so again. Then they get confused by the ZIP file, which mostly behaves like a folder in Explorer but is not quite the same; and of course since Windows XP SP2 all downloaded files are “blocked” by default which is another source of perplexity.

If you add complications like hidden folders and hidden file extensions in Windows Explorer, what should be a simple task can be really awkward. Let’s say your user has a video file called somemovie.vob that needs to be renamed to somevideo.mpg before it will play. With the default setting, when you rename it you actually get somevideo.mpg.vob. You have to talk the user through showing file extensions before it will work, or maybe open up a command prompt and use ren which does actually work correctly. Microsoft could fix this with a “Change file extension” option in Windows Explorer, but I do not know if this has made it to Windows 8.

The problems with hidden files and hidden file extensions show that something is wrong with the underlying model. Showing them is wrong because they are ugly and confusing; hiding them is wrong because you sometimes need them. It is a partial abstraction that is only partly successful. 

Apple’s solution in iOS is to hide the file system completely. The user will never have these problems. However, this is an autocratic approach that introduces new difficulties. If you have a documents in Pages in iOS you cannot move it directly to DropBox, for example, because there is no accessible file system. You are limited by whatever options the Pages app gives you for doing something with a document.

I believe thought that Apple is on the right lines. The app-centric view makes sense to users, and abstracting the file system so that users do not generally need to care about the location of a file is a reasonable goal. If the File Explorer goes the way of the command prompt, and becomes a tool used rarely by most users, that will mean Windows usability has improved.

Cloud-centric computing has potential to improve this, with your local storage just a cache of your internet-stored documents and data.

Finally, it is worth noting that file operations have got significantly better in Windows. Using the clipboard to copy and paste files, which I think came in with Windows 95, was a big advance. Then Vista fixed another annoyance: multiple file operations would abort on the first failure, leaving you uncertain which files had actually been transferred. Vista broke performance though, and file operations could be hilariously slow as Windows “discovered” files or just seemed to hang with a spinning bagel. Service packs and then Windows 7 pretty much fixed that.

I still like ROBOCOPY though. Hey Microsoft – why doesn’t Explorer have “Copy new and changed files only” or “Mirror directory”?

Windows 7 Service Pack 1 install failures common?

There are reports coming in of Windows 7 install failures causing problems for users. There will always be some failures, but normally there is an easy way to rollback; unfortunately SP1 is making machines unbootable in a number of cases:

I have about 10pc’s in my company. They all failed this morning after the service pack 1 for windows 7 x64 systems.

I wonder on a global scale what financial damage this service pack caused. Isn’t a service pack made for fixing issues instead of creating new ones.

So now what? Tomorrow windows installs it again and the company stops working again? Is there a fixed update in the making???

A typical issue is “fatal error c0000034 applying update operation”.

If this happens to you, there are some emergency fixes suggested in the thread referenced above.

Silverlight native extensions allow deep Windows 7 integration, but forget cross-platform

Microsoft has released Native Extensions for Silverlight, a set of libraries which enable access to Windows 7 features including taskbar Jump Lists; access to attached devices including webcams, cameras and phones; the sensor API for accelerometer support; and even the ability to intercept Windows messages. The ability to intercept Windows messages allows lots of interesting hacks as veteran Visual Basic developers will recall; it was one of the tricks used to overcome limitations in early versions of VB.

The native extensions are only available to out of browser applications running outside the sandbox; the user must consent to trust such applications. Silverlight 4 already had the ability to use COM automation. These new extensions simply build on this existing feature, providing COM automation wrappers for these Windows 7 APIs.

What this means though is that Silverlight developers can create applications that integrate deeply with the Windows 7 desktop and local hardware.

Another way of looking at this is that the subset of Windows applications that can be implemented in Silverlight rather than the full .NET Framework has now increased. It lends some support to the theory which I considered here, that a future version of Silverlight will be the application platform for the Windows 8 app store and for mobile devices running Windows 8. This is speculation though; Microsoft has not said much publicly on the subject. Silverlight is well suited to an app store since installation is easy, updates are near-automatic, and apps are isolated from the rest of the operating system.

The native extensions are Windows 7 only. Forget the Mac, these things do not even work on Windows XP. They only apply to trusted out of browser applications though. Silverlight running in the browser still has similar features on Windows and Mac.

Fixing slow access to SharePoint mapped drives in Windows 7

I’ve heard recently from a couple of people who found that accessing SharePoint folders via mapped drives in Windows Explorer had suddenly become very slow – even taking several minutes to open a folder. This is in Windows 7, but the same might (or might not) apply to other versions of Windows.

SharePoint folders in Windows Explorer use WebDAV (Web-based Distributed Authoring and Versioning) under the hood, so although it looks like just another shared drive it is actually using HTTP calls to list the files. It is useful if you are out and about, because you can get at documents on your internal network over the internet, using SSL to secure the connection.

The fix that has worked in both cases is a mysterious one. You open Internet Explorer (even if you use a different browser), go to Tools – Internet Options – Connections, click LAN settings, and uncheck Automatically detect settings.


I am not sure why this works but presumably with this option checked there is some sort of useless auto-detection going on which times out and then repeats.

No promises; but making this change can dramatically improve performance.

Fixing Age of Empires 2 graphics in Windows 7

Age of Empires 2 is one of my favourite games, especially multi-player. Age of Empires 3 was better in some ways, worse in others; somehow it is not as much fun. One of the problems with version three is that the scenarios are more constrained; and the introduction of home cities and colonies changes the game in a radical and not altogether welcome manner.

The good news is that Age of Empires 2, also known as Age of Kings or with the expansion pack Age of Conquerors, still runs on Windows 7 – impressive for a game that was released ten years ago. The bad news is that the graphics are messed up. Here is how it looks:


It’s playable, but that purple-stained sea and mottled grass is just not how it should be.

Fortunately there is a fix, and you can get Age of Empires 2 looking like this instead:


The fix? Terminate the Explorer process. Here’s what you do:

1. Run Age of Empires 2
2. Press Ctrl-Alt-Delete and click Start Task Manager
3. Click the Processes tab, find explorer.exe, select and click End Process
4. Switch back to Age of Empires 2 with Alt-Tab

Presto! the graphics now work.

Once you are done playing, exit Age of Empires. If Task Manager is no longer running, press Ctrl-Alt-Delete to get it back. Then click Applications, New Task, and type Explorer in the dialog. Click OK and your taskbar and desktop will return.

The only remaining question: why does this work?

Note: kudos to TechSmith Snagit which was able to capture the screens successfully; the first two capture utilities I tried could not do so. I had to set DirectX as the input type and use a timed capture.

25 years of Windows: triumph and tragedy

I wrote a (very) short history of Windows for the Register, focusing on the launch of Windows 1.0 25 years ago.


I used Oracle VirtualBox to run Windows 1.0 under emulation since it more or less works. I found an old floppy with DOS 3.3 since Windows 1.0 does not run on DOS 6.2, the only version offered by MSDN. In the course of my experimentation I discovered that Virtual PC still supports floppy drives but no longer surfaces this in the UI. You have to use a script. Program Manager Ben Armstrong says:

Most users of Windows Virtual PC do not need to use floppy disks with their virtual machines, as general usage of floppy disks has become rarer and rarer.

An odd remark in the context of an application designed for legacy software.

What of Windows itself? Its huge success is a matter of record, but it is hard to review its history without thinking how much better it could have been. Even in version 1.0 you can see the intermingling of applications, data and system files that proved so costly later on. It is also depressing to see how mistakes in the DOS/Windows era went on to infect the NT range.

Another observation. It took Microsoft 8 years to release a replacement for DOS/Windows – Windows NT in 1993 – and another 8 years to bring Windows NT to the mainstream on desktop and server with Windows XP in 2001. It is now 9 years later; will there ever be another ground-up rewrite, or do just get gradual improvements/bloat from now on?

I don’t count 64-bit Windows as a ground-up rewrite since it is really a port of the 32-bit version.

Finally, lest I be accused of being overly negative, it is also amazing to look at Windows 1.0, implemented in fewer than 100 files in a single directory, and Windows 7/Server 2008 R2, a platform on which you can run your entire business.

Delphi XE still not quite ready for Vista/Windows 7

I’ve successfully installed Embarcadero RAD Studio XE (including Delphi). I’m running Windows 7 64-bit. On first quitting RAD Studio (which is still called bds.exe – it stands for Borland Development Studio) I got this message:


Fortunately I know exactly what this means. Read here for my earlier explanation. And if I go to the registry editor I can see these entries:


I also still get the error:

Error executing ‘C:\ProgramData\{7DE921C9-42C8-4DA3-8A44-043C3349FD1D}\Setup.exe’: The requested operation requires elevation

In one sense the error is not important, and the dialog does not reappear. It is still an ugly dialog, and as you can see from my Registry Editor, not a new one. Maybe next time?