Forcibly deleting remnants of a Windows user profile

This content is 14 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Every now and again, I come across an issue that takes up far more of my time than it should do… and, this afternoon, that’s exactly what happened so I’m posting the details here for anyone else in the same situation.

I’d installed a new copy of Windows in a virtual machine and, because it wasn’t domain-joined as part of the setup, the out of the box settings made me create a local user account that I didn’t need.  After joining the domain and logging in as an administrator, I deleted the account and the profile, but was given a warning that not all files were removed.  I checked and, sure enough, the folder for the account (called Mark) was still there in C:\Users.  All of the usual attempts to remove it failed, regardless of what I did with permissions until I found a post on the My Digital Life blog, titled Delete Undeletable Files in Windows Vista.  I was running Windows 7 but this advice for Vista sounded hopeful, so I ran the following commands against the folder that was causing me grief:

takeown /f foldername /r /d y
icacls foldername /grant administrators:F /t

(for files, I would not have needed the /r switch on the takeown command to recurse the folder structure.)

I was still having trouble deleting the folder from Windows Explorer; however these commands had given me the clue I needed (and answered why Explorer told me that the location was shared, but it didn’t show up in the list of shares…) – the AppData hidden folder was still there.

Using the command line, I navigated C:\Users\Mark\AppData and its two trees (Local and Roaming) to remove around 10 files and folders, after which I was able to successfully remove the C:\Users\Mark folder.

With that out of the way, I could log in with my domain account (also called Mark) and its profile was created at C:\Users\Mark instead of C:\Users\Mark.domainname.

Windows 7, BitLocker, Ubuntu, and the case of the missing disk partitions

This content is 14 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Last Thursday was probably best described as “a bad IT day” – over the course of the day I “lost” the partition structure on my netbook’s hard disk, and then got it back again.  It all started because I wanted to dual boot Windows 7 and Ubuntu – and, although I’ve still not managed to acheive that goal, I did learn a bit about recovering Windows along the way…

Since last October, my netbook has been running Windows 7 Ultimate Edition with a BitLocker encrypted hard drive.  It’s been working well but I wanted to fire up an installation of Ubuntu from time to time, so I decided to see if I could dual-boot the two systems.  Clearly I wouldn’t be able to run Ubuntu from a partition that Windows had encrypted (I did briefly consider running Linux as a VM) but I was able to shrink the Windows partition in the Disk Management console and free up around 60GB of hard disk space, with a view to following Microsoft’s advice for dual booting Windows and Linux with BitLocker enabled (although my netbook does not have a TPM so I’m not sure if it would work for me).

I tried to run the installer for Ubuntu 10.04 Netbook Edition but it saw my disk as one chunk of unallocated space, with no existing operating systems installed.  As I knew there were two NTFS partitions there and I didn’t want to wipe them, I quit the installer and rebooted into Windows.

It seemed logical that BitLocker was preventing Ubuntu from seeing the true state of the disk, so I first tried disabling BitLocker, and then removing it altogether (the difference between disabling and removing BitLocker is described on the Microsoft website).  Unfortunately that didn’t make any difference, as far as Ubuntu was concerned, the disk was entirely free for it to do as it liked.

I checked in Windows and, as I thought, it was a basic disk (not dynamic), so I tried rewriting the master boot record (MBR) using the bootrec.exe utility with the /fixmbr switch (as described in Microsoft knowledge base article 927392).  That still didn’t help and, after crowdsourcing for advice I tried a number of utilities to take a look at the disk:

  • Acronis Disk Director Suite agreed with Windows – it saw that I had 64.42GB of unallocated space at the end of the disk, plus 2 primary NTFS partitions (100MB System Reserved and 84.53GB with Windows 7 on it).  It also confirms that the disk is an MBR type (0x0AA55).
  • Ubuntu’s disk utility also saw the NTFS partitions, but thought the disk was a GUID Partition Table (GPT) and complained when I tried to create an ext4 partition in the free space (the message included reference to “MS-DOS Magic” and said that the disk looked like a GPT disk with the remains of an MBR layout present).
  • Gnome Partition Editor (GPartEd), when run from the Ubuntu installer CD, thought the disk was 149.05GiB of unallocated space, but, when run from the GPartEd Live CD, it saw the NTFS partitions (as unformatted) and even allowed me to create an ext4 partition in the free space at the end of the disk.  Unfortunately that also prevented Windows from booting…

At this point, I had no operating system at all, so I booted from a Windows 7 System Repair Disc I had created earlier (just in case).  I tried to repair my system but the message I got back said:

This version of System Recovery Options is not compatible with the version of Windows you are trying to repair.  Try using a recovery disc that is compatible with this version of Windows.

Not too many clues there then… only when I tried to reinstall Windows (thinking it might put the OS back and move the old installation to Windows.old or something similar) did Windows Setup give me a helpful message to tell me that the disk had a GPT layout and that it couldn’t be installed onto such a disk.  It turns out that was as a result of my efforts to create an ext4 partition in the free space at the end of the disk but, sure enough, when I booted into Windows PE and ran diskpart.exe, disk 0 was showing as type GPT.  Thankfully, diskpart.exe was also happy for me to run the convert mbr command (also described in Microsoft knowledge base article 282793), after which I could run a Startup Repair Recovery Tool from the System Repair Disc.  At the end of this, I restarted the netbook and Windows 7 came up as if nothing was wrong… phew!

Incidentally, if Windows thinks the disk is not empty, it will not convert from GPT to MBR, so the trick is to use something like GPartEd to make a change (write a partition in the empty space and then remove it again), after which the convert mbr command will work.  I know this, because I borked the system again as I tried once more to see if either the Ubuntu Disk Utility or GPartEd would create the disk layout that I required.  They didn’t, and the Ubuntu installer still refused to recognise the existing NTFS partitions (Ubuntu’s dual-boot advice doesn’t really seem to explain why either).

I’ve tried the alternative installer for Ubuntu Desktop too but that also sees the disk as one big 160GB lump of free space.  Unfortunately the Ubuntu installer for Windows (WUBI) won’t help as it installs Ubuntu side by side on the same partition as Windows and, critically for a portable device, does not support hibernation.  What I still don’t understand is why Linux utilities think the disk is a GPT disk, and Windows sees it as MBR… as William Hilsum tweeted to me, “[perhaps] Bitlocker does more at the disk level than [he] thought”.

First service pack for Windows 7 and Windows Server 2008 R2

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

It’s not news that there will be a service pack for Windows 7 and Server 2008 R2.  We don’t know when it will come (and I’ve been asked not to speculate…) – and we don’t know if there will be a public beta but there will be a service pack.

Here’s what Microsoft has announced so far:

  • The same service pack will be applicable for Windows server and client – i.e. for Windows 7 and Server 2008 R2 (just as with Vista/Server 2008 service packs).
  • SP1 will enable two key new features for Windows Server 2008 R2: Dynamic Memory for Hyper-V, allowing for dynamically adjusting RAM allocation between virtual machines; and RemoteFX, which is an enhancement for RDP for rich media and 3D.
  • For Windows 7, there are no significant changes in SP1 – it’s effectively an update rollup – there is no need to wait for service pack 1 before deploying!

Windows native boot from VHD roundup

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

This is the first of several planned posts based on knowledge gained at Tech·Ed last week – but this one is necessarily brief. Mark Minasi, who presented the session that this content is based on, owns the copyright on the materials he presented (although Microsoft still distributed them to delegates). Consequently, I can’t write his session up as fully as I would like; however this post captures some of the key points (along with some narrative of my own) as I see nothing that’s not already in the public domain (and some of which has already been written about on this blog). The value in Mark’s presentation was that it pulled together various items of information into one place and explained it in a way that was simple to follow – consequently I’m not repeating the full details, just the high level overview, with some extra links where I feel they add value (Mark seems like a decent fellow – he’s only trying to protect his income and I suspect the real problem would be if I presented his materials as my own – I’m sure he would understand the fine line I’m attempting to walk here):

  • The session was titled “How Windows Storage is Changing: Everything is going VHD (CLI302)” and that’s pretty spot on – the virtual hard disk (.VHD) file format allows an entire disk partition (but not a whole drive with multiple partitions) to be packaged in a single file complete with folder structure and NTFS permissions: Microsoft’s Storage Server uses .VHD files for iSCSI targets; Windows Backup has been able to perform completed PC backups to .VHD files since Vista; and with Windows 7 we have the ability to natively boot Windows from a VHD file. Just to be clear – this is not client/server virtualisation (as in with a hypervisor) – this is storage virtualisation (presenting the VHD container as as a logical volume, stored on a physical disk).
  • To understand native .VHD booting, it’s useful to understand recent changes in the boot process: boot.ini is no more – instead we have a Boot Configuration Database (BCD) and a system reserved partition (incidentally, that’s the same one that is used for BitLocker, and is automatically created in Windows 7, with no drive letter assigned).
  • Running Windows Backup from the command line with wbadmin.exe requires the use of the -allcritical switch to ensure that the System Reserved partition is backed up.
  • As Mike Kolitz described back in May, access to .VHD file contents from Windows 7 and Server 2008 R2 is provided by a completely new mini-port driver in the storage stack for VHD files. This VHD driver enables requests to files in the VHD to be sent to the host NTFS file system on the physical partition where the VHD file is located. VHD operations can also be performed on a remote share.
  • The steps for creating a .VHD file, attaching (mounting) it, assigning a drive letter and formatting the volume can be found in my previous post on running Windows from a USB flash drive (as well as elsewhere on the ‘net).
  • The diskpart.exe command can be used to view the details of the VHD once mounted (detail disk) and it will be identified as a Msft Virtual Disk SCSI Disk Device.
  • The System Reserved Boot Partition may populated using the bcdboot.exe command. After this partition has been created, the remainder can be partitioned and formatted, then a pre-configured .VHD can be copied to the second (non-system) partition. After editing the BCD and rebooting, the physical drive will be something like D: or E: (depending on the presence of optical drives) and the .VHD will be C:.
  • There are various methods for creating a pre-configured .VHD, including booting a reference PC from Windows PE and using imagex.exe (from the Windows Automated Installation Kit) to capture the disk contents to a .WIM file, then mounting the target .VHD and deploying the .WIM image to it. Alternatively, there is a SysInternals tool called Disk2VHD.
  • The changes to the BCD are also documented in a previous post on this site but Mark also highlighted the existence of the [locate] parameter instead of specifying a drive manually (James O’Neill uses it in his post on booting from VHD and the joy of BCDEdit).
  • There are GUI tools for editing the BCD, but bcdedit.exe is worth getting to know:

    “The GUI BCDEdit commands are rather like having a 3 metre ladder for a 5 metre wall” … “Step into the light, come to the command line, in the command line there is freedom my friends.”

    [Mark Minasi at TechEd Europe 2009]

  • Booting from VHD is a great feature but it does have its limitations: for instance I can’t use it on my everyday notebook PC because the current release doesn’t support hibernation or BitLocker.
  • To finish up his presentation, Mark demonstrated an unsupported method for installing Windows directly to .VHD: Run Windows setup and press shift and F10 to break out into a command prompt; wipe and partition the hard drive, creating and attach a new .VHD; ignore Windows setup’s protests that it can’t be installed to the .VHD – click the Next button anyway and it should work (although it may be patched in a future release).

Finally, if the contents of this post are interesting, this blog recently featured two guest posts from my friend and colleague, Garry Martin that build on the concepts described above: in the first post, Garry described the process for booting Windows 7 from VHD on a Windows XP system; the second went deep into an unsupported, but nevertheless useful, method for booting Windows 7 or Server 2008 R2 from a VHD on removable media… perhaps a USB flash drive? There are also some useful links in Mike Ormond’s post on native VHD booting and Jon Galloway has a whole bunch of tips even if he is still searching for his virtual machine nirvana.

Using a Windows System Image backup to transfer a configuration between computers

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

One of my colleagues left our organisation a couple of weeks ago and his notebook PC was up for grabs (kind of like vultures looking for prey, my manager and I were trying to grab the best bits of his relinquished IT assets…). To be honest, the PC is only marginally better than the one I had already but it did have a slightly faster processor (Intel Core 2 Duo Mobile P8400 vs. T7500), a larger hard disk, and was in better physical condition (I’ll try not to drop this one!). I did need to transfer my configuration to the “new” machine quickly though (i.e. between the start and the end of our team meeting today!) so that my “old” machine could be reallocated to someone in need of a more modern PC.

I could have messed around with user state migration onto a fresh build; however I’m flying out to TechEd Europe at the weekend and I wanted to be sure that I had all my applications working so I tried a different approach. The two computers are similar, but not identical (both Fujitsu-Siemens Lifebooks – one is an S7210 and the other is an S7220) so I decided to try creating a Windows System Image and restoring it onto a different machine, then letting Plug and Play sort out the hardware. It’s a bit messy (with new network adapters etc.) but the theory was sound.

Plug and Play driver detection on Windows 7Not only was the theory sound, but it worked. After booting the “new” machine from the Windows 7 Repair Disc that I was prompted to create at the end of the backup, I restored my system, complete with all applications and data. Plug and Play did indeed identify all of my hardware, combined with Microsoft Update for a missing display driver (that would have worked too if I had been online at the time). Windows even managed to reactivate itself as the product key was still valid so my system is reporting itself as genuine (note that Windows licences remain with individual computers; however in this case both machines were licensed for Windows 7 using a volume license product key).

It’s important to note that this effectively cloned the machine (yes, I could have used any number of disk imaging products for this, but I was using the out-of-the-box tools) and so I was careful not to have both machines on the network at the same time. Indeed the last step (before passing the “old” machine on to my manager) was to securely erase my data partition, which I did using the cipher command, before booting into the Windows Recovery Environment one more time to run up diskpart and remove all of the disk partitions.

The only remaining hurdle is moving the (so far empty) BitLocker Drive Encryption Partition from its current location in the middle of my hard disk (which was the end of the smaller disk in my old machine) but that should be possible as I haven’t actually encrypted the drive on this PC.

Not bad for a few hours work, especially as there was no downtime involved (I was able to use the “old” machine to deliver my presentation whilst the “new” one was being prepared).

Protecting my netbook with BitLocker

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

One of the reasons I run Windows 7 Ultimate edition on my netbook is to take advantage of features like BitLocker. For those who are not aware of this technology, BitLocker has offered whole drive encryption for fixed hard disks since Windows Vista but Windows 7 also includes encryption capabilities for removable devices (BitLocker To Go).

Even though I don’t keep much data on my netbook, it’s exactly the sort of device that’s likely to be lost or stolen and it seems like a perfect candidate for data encryption – although my main concern was that I might encrypt the device and then lock myself out (and I’m not the only one who’s had those concerns). Luckily there are options for key recovery – ranging from storing a copy of the key in a file or in Active Directory (not applicable for me as my netbook is not domain-joined) to the most basic printing the key on a piece of paper and keeping it in a safe place (i.e. not the carry case for my computer!).

So, armed with the knowledge that I had backed up all my critical data, just in case something went wrong, last weekend I “BitLockered” my netbook and I’m pleased to say it was really straightforward (especially as Windows 7 creates the necessary drive partition at install-time). It would have been even easier if my computer had a trusted platform module (TPM) chip but, even so, Windows can be configured to allow encryption without a TPM – I just need to supply a startup key when I turn the computer on – in this case I used a small capacity USB thumb drive to store the key, then remove it from the computer after the drive has been unlocked. In effect, I can only start (or resume) the computer with that USB “key” – or enter the recovery key to disable the encryption entirely.

There are two common ways to allow Windows to use BitLocker without a TPM: one involves editing the Local Security Policy and the other uses a few registry tweaks, which is the one I chose:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FVE]
“UseAdvancedStartup”=dword:00000001
“EnableBDEWithNoTPM”=dword:00000001
“UseTPM”=dword:00000002
“UseTPMPIN”=dword:00000002
“UseTPMKey”=dword:00000002
“UseTPMKeyPIN”=dword:00000002

To revert to the default settings, use a .reg file with the following contents:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\FVE]
“UseAdvancedStartup”=-
“EnableBDEWithNoTPM”=-
“UseTPM”=-
“UseTPMPIN”=-
“UseTPMKey”=-
“UseTPMKeyPIN”=-

Then, using Windows Explorer, right click the drive you want to encrypt and select the option to turn on BitLocker, and follow the wizard. Make sure you store a copy of the recovery key, as this will be required to recover the data on a BitLocker protected drive.

It took a while for my drive to encrypt and, despite almost every reference for this that I’ve seen saying that a dialogue box will be presented showing encryption progress, I didn’t see this – all I saw was that the drive was almost full and lots of hard drive activity, then I got my free space back and the icon for the drive had a padlock and a key on it. Now, if I right click the drive there are options to manage BitLocker, including duplicating the startup key and saving/printing a new copy of the recovery key.

All in all, it was pretty painless and I haven’t noticed any performance degradation but if someone does take a fancy to my netbook, they won’t be able to access the data on it.

For more information, see the Windows BitLocker Drive Encryption Step-by-Step Guide on the Microsoft TechNet website and the BitLocker drive encryption team blog (although that hasn’t been updated in a while). Michael Pietroforte has also compared BitLocker with TrueCrypt, concluding that TruCrypt lets you choose your own recovery passphrase; however BitLocker can be managed with Group Policy and the keys can be stored in Active Directory Domain Services. There’s more information on storing BitLocker keys in Active Directory on the TechNet website (domain controllers must be running Windows Server 2003 SP1 or higher and schema extensions are required).

Microsoft and Sky launch Sky Player on Windows 7

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

In my post earlier this evening about the Windows 7 launch, I mentioned new content providers in Windows Media Center and that was one of the other big announcements today – Sky and Microsoft announced the addition of Sky Player, Sky’s online TV service, to Windows Media Center in Windows 7, creating a new and exciting way to watch live and on-demand TV from Sky on a PC.

In a few days time (27 October), Sky Player will also be available on the Xbox 360 and, whilst it can also be accessed from other platforms, the integration into Microsoft’s media offerings is part of Microsoft’s multi-screen entertainment strategy which will bring a wide range of live and on-demand entertainment programmes to the Windows platform.

The service will give Windows 7 users access live and on-demand pay TV currently available via Sky Player, including movies, sports, entertainment, children’s programming, music, arts and documentaries.

Sky Player in Windows Media Center on Windows 7

For existing Sky TV customers, Sky Player in Windows 7 provides an alternative to their set top box in order to view their Sky TV. For new customers, Sky Player in Windows 7 will offer a wide range of live channels and on-demand content via a number of monthly subscription packages.

According to the press release:

“Windows 7 enables audiences with a broadband Internet connection to watch TV from Sky on a PC. In addition to offering digital music, photos and personal videos all in one place, Windows 7 makes it easier to discover great TV, sports and movies from Sky straight from the PC desktop, via a new desktop gadget. Users can also browse programme galleries or search for shows using keywords.”

Ashley Highfield, Managing Director and Vice President Consumer and Online at Microsoft UK (formerly of both the BBC and Project Kangaroo), commented:

“The way UK consumers interact with TV is changing. Audiences now want to consume great quality TV anywhere and at any time and are demanding a lot more from their TV experience. With the launch of Windows 7 and through partners such as Sky, we are making new things possible and delivering TV to British viewers the way they want it”

Sky recommends a 2Mbps broadband connection and when asked if the content was high definition, Sky’s Director of OnDemand, Griff Parry, said that the company is looking to improve the service over time but for now the focus is on great quality standard definition programming.

Maybe one day we’ll see the BBC’s iPlayer integrated in a similar manner – I certainly hope so!

Microsoft launches Windows 7 – is this the best Windows yet?

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Every now and again, tiny tech bloggers like me get a break and are invited to events alongside “real journalists”. So, here I am, at London’s Hospital Club, brushing shoulders with the UK’s mainstream media – from the BBC and Sky through to TechRadar and The Register, covering Microsoft’s Windows 7 Launch.

Windows 7 is like no other operating system release that I’ve known. Unlike its predecessor, it’s enjoyed massive press support from the outset, with a widespread beta programme (around 8 million official users and 7 million more “unofficial ones”), a solid release candidate and the software itself was released several weeks ago. Volume license customers, developers, technology specialists and Microsoft partners have had access to the final release of Windows 7 for almost three months, evaluation copies are available on the web – and this operating system already runs on a huge number of the world’s PCs – that’s before it’s even launched! I don’t remember this much buzz around any new Windows release – at least not since Windows 95.

Tomorrow marks the general availability of Windows 7 in the retail channel, making it the de facto choice for consumers and small businesses when purchasing new PCs – 14 million of which are expected to be sold in the UK over the next year – and many of those who have purchased PCs since July are also entitled to an upgrade.

Ashley Highfield, MD and VP of Consumer and Online at Microsoft UK, said that Windows 7 marks a pivotal turning point for Microsoft – listening to consumers and understanding what they want – to offer simple, easy, fun computing – whether at home or work.

He explained that the UK is at a tipping point where a survey indicated that around 78% of people see the work/life balance as fluid – there is no more “9 to 5” and many of us expect to access social media at work, in exchange for working on e-mail at home in the evening. In addition, Internet advertising revenues now exceed those for TV advertising, and the sales of PCs exceeded televisions this summer, marking a fundamental shift in audience behaviour.

Microsoft’s ultimate vision is often described as “3 screens and a cloud” (devices, PCs and TV) – in effect Microsoft is the glue to bind together our digital lives and Windows 7 is key to building that vision.

I’m used to working with Microsoft in the enterprise space – where they are either recognised as a provider of software development tools or of IT business and infrastructure applications. But, for the consumer, Highfield explained that Microsoft’s offerings have been a little patchy over last few years… I don’t think I heard the word “Vista” uttered once by Microsoft at today’s press launch – it’s almost as if it’s become V-v-v-the-operating-system-that-must-not-be-named.

Microsoft believe that Windows 7 is an exemplar of change – alongside Bing, Windows Live services, Windows Phone, and Xbox 360 it marks a new dawn for Microsoft’s relationship with its consumers.

So, what’s so great about Windows 7?

Julie Larson-Green, Microsoft Corporate VP for Windows Experience was heavily involved in the programme to bring Windows 7 to market. After presiding over the Office 2007 release, with its controversial ribbon user interface, Windows 7 could have gone either way but I really believe that Microsoft has done a good job with Windows 7.  Larson-Green credits this to the diagnostic information that Microsoft received via the Customer Experience Improvement Programme – so much data that they had to cap the results at 1 billion sessions. This information allowed Microsoft to validate their research on how to simplify everyday tasks. In addition, pre-beta copies of Windows 7 were distributed to developers as long ago in late 2008, allowing them to start developing applications for the new platform. today, more than 16,000 software and hardware companies are building solutions on Windows 7 and over 44,000 developers are enrolled in the Windows Ecosystem Readiness Program.

Leila Martine, Windows Consumer Business Group Lead at Microsoft UK talked about how Windows 7 delivers on a simple promise: making it easier for people to do the things they want on a PC. The new operating system offers a streamlined user interface and significant new features that make everyday tasks easier and allow people to get the most out of computers of all styles and sizes.  The following are a few of the many ways that consumers can experience a more simplified PC with Windows 7:

  • Simplifies everyday tasks:
    • Taskbar: completely redesigned to help cut clutter, and get more done, with features like thumbnail previews of webpages, documents and even running video.
    • HomeGroup:  easily share files and printers with other Windows 7 PCs.
    • DeviceStage: shows the status of all connected devices such as cameras and mobile phones, making it easier to synchronise and manage them.
    • Photos and Videos: Windows Live Photo Gallery and Windows Live Movie Maker offer customers great free options to edit photos and videos, then to easily share them including uploading to popular websites such as Flickr and YouTube.
    • Snap: drag an open window to the screen’s border and automatically re-size it. Snap two different windows to the left and right borders for a perfect comparison.
    • Shake: click a window pane and shake the mouse to minimise all other open windows.  Shake the pane again to restore the windows to their original sizes. 
    • Internet Explorer 8: Microsoft’s fastest, easiest, and safest browser ever with many new security features such as SmartScreen filtering.
  • Works the way you want:
    • Faster on, faster off:  every Windows 7 user can benefit from the focus on underlying performance, faster startup, resuming and shut down time, together with enhanced power management.
    • Mobile made easier: all mobile computing settings are in one place with the Windows Mobility Center.
    • Protecting your PC:  Safeguarding data on the PC is easier with advanced backup capabilities and the free Microsoft Security Essentials download to protect against viruses, spyware, and other malicious software.
  • Makes new things possible:
    • Windows Touch: interact with the PC with a touch-screen monitor, using fingers and multi-touch gestures.
    • PlayTo: stream digital music, videos, and photos to other PCs or devices such as an Xbox 360 connected to a TV.
    • Internet TV: new content providers (such as the Sky Player) and an improved interface make it even easier to watch TV on the PC.
    • Rich gaming and graphics: Windows 7 includes performance enhancements that take power gaming and entertainment to a new level, with 64-bit support and DirectX11 graphics.
    • Location-aware printing – documents are sent to the right printer whether it’s at home or at the office. Offline files allow users to work offline and automatically synchronise between a PC and documents on the office network.

(and that’s not even considering the many business benefits with DirectAccess for clientless VPN connectivity, Branch Cache for efficient file transfers, BitLocker and BitLocker To Go for fixed and removable device encryption, and AppLocker for software control.)

Having worked with Windows 7 for over a year now, I know that the real improvements are subtle.  When I’m asked why Windows 7 is so great I can’t point to one single feature but I can tell you that if my corporate IT guys tried to take me back to Windows XP they would have one hell of a job prising my PC out of my hands.  My Windows 7 and Office 2010 desktop includes so many timesaving shortcuts that stepping back to Windows XP and Office 2003 is like going back in time.

What will it cost me?

Windows 7 goes on sale at midnight tonight with estimated retail pricing as follows (although actual pricing may vary by retailer):

  • Windows 7 Home Premium Upgrade: £79.99 until 31 December 2009, £99.99 thereafter
  • Windows 7 Professional Upgrade: £189.99
  • Windows 7 Ultimate Upgrade: £199.99
  • Windows 7 Home Premium: £149.99
  • Windows 7 Professional: £219.99
  • Windows 7 Ultimate: £229.99

There are also some limited time deals available including a discounted upgrade of £49 with new PC purchased until 2 Jan 2010; a family pack offering 3 licenses for £149.99 and the current Student offer of £30 for Windows 7 Home Premium or Professional.

Shop around for the best deals

As might be expected, the major UK retailers are committed to Microsoft’s Windows 7 launch and Jeremy Fennel, Category Director at DSGi explained that they can tell it’s a good product as it hasn’t needed Microsoft to hype it – the press and customers have already done that.  DSGi’s customer research says that customers want a better user experience with fewer interruptions, better battery life, and faster startup/restart times – with Windows 7 delivering all three. 

By far the most telling statistic I heard all morning about the potential for Windows 7’s success related to the Windows 7 pre-order offer.  DSGi experienced what Fennel called “a phenomenal reaction” to this and sold more copies of Windows 7 in 3 weeks than they sold of Vista in the whole of its first year!

Fennel also indicated that awareness of Windows 7 has ramped in the last 4-6 weeks – with 60% of consumers delaying new PC purchases until launch.  In order to build Christmas sales, DSGi’s trade in promotion starts tonight – with up to £100 off when trading in old PC at Currys and PC World as well as half price installation (at £24.99) and free expert advice from their specialist tech support service, the TechGuys.

That’s just DSGi’s campaign – I have no doubt that other retailers will be similarly competitive in their Windows 7 efforts in the run-up to Christmas.

In summary

Windows 7 is a solid, reliable operating system packed with features and functionality that can be used to derive significant benefits for consumers and enterprise customers alike.  Already enjoying significant interest from press and customers, there is little doubt that this will be a successful release for Microsoft but it will always have it’s detractors, citing problems such as upgrading from XP, cross grading from other product editions, or running obscure applications on PCs cobbled together from various arcane components.  Even though Windows runs on around a billion PCs worldwide, new computing models threaten its dominance and Microsoft needs to remain relevant in 2010 and beyond. One journalist asked Microsoft how relevant Windows will be by the time that Windows 8 comes along [in 2012] and Ashley Highfield’s response amused me greatly: “Give us a chance we’re just launching Windows 7” but I’m sure Windows will be with us on the desktop for a while yet – particularly if Microsoft is able to execute their “3 screens and a cloud” vision – and I have little doubt that they will. Windows 7 is important to Microsoft – and it is, quite possibly, the best Windows yet.

Native VHD boot Windows 7 or Server 2008 R2 from an external USB drive

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Guest Post
Are you excited about Native VHD Boot for Windows 7 (Enterprise or Ultimate) and Windows Server 2008 R2 but wish you could use an external USB drive to store the .VHD files? Well unfortunately it isn’t officially supported but, if that doesn’t worry you too much, you might find this post interesting…

Background

In order to get Native VHD Boot working from an external USB Disk, there are a few things we need to understand about device drivers and their load orders.

Setup and the PnP manager configure devices starting with the system root device, followed by the child devices of the root device, the children of those devices, and so on. To influence the driver load order outside of this sequence, we need to change the .INF files for the USB related drivers, specifying relevant values in the service-install-section, specifically the StartType and the LoadOrderGroup entries.

A PnP driver should have a start type of SERVICE_DEMAND_START (0x3), specifying that the PnP manager can load the driver whenever it finds a device that the driver services. USB drivers normally behave in this manner and have this start type.

However, if a driver is required to boot the machine (such as when, oh I don’t know, maybe attempting something like native VHD boot from an external USB drive), the drivers for the device should have a start type of SERVICE_BOOT_START (0x0).

On system boot, the operating system loader loads drivers of type SERVICE_BOOT_START before it transfers control to the kernel. These drivers are in memory when the kernel gets control. Boot-start drivers can use the .INF LoadOrderGroup entries to order their loading. You can see the List order at HKLM/SYSTEM/CurrentControlSet/Control/ServiceGroupOrder.

For Native VHD Boot from an external USB drive to work, we need to modify the behaviour of six device drivers:

  • usbccgp – Microsoft USB Generic Parent Driver
  • usbehci – Microsoft USB 2.0 Enhanced Host Controller Miniport Driver
  • usbohci – Microsoft USB Open Host Controller Miniport Driver
  • usbuhci – Microsoft Universal Host Controller Miniport Driver
  • usbhub – Microsoft USB Standard Hub Driver
  • usbstor – USB Mass Storage Driver

The USB drivers have a LoadOrderGroup entry of Base, which is considerably down the list, and critically much later than we need to use them as a boot device. We therefore need to modify the LoadOrderGroup to something more appropriate that will be processed earlier in the boot cycle. There is some debate about the best entries to use for this purpose, and whilst it seems the below is technically most appropriate, I began this journey with all entries set to use Boot Bus Extender and have continued to use that without issue. However, you may want to try the settings below as an alternative:

  • usbccgp – Boot Bus Extender
  • usbehci – Boot Bus Extender
  • usbohci – Boot Bus Extender
  • usbuhci – Boot Bus Extender
  • usbhub – System Bus Extender
  • usbstor – SCSI Miniport

So, to enable Native VHD Boot from an external USB drive, we need to modify the StartType and LoadOrderGroup of each of those drivers, and critically, ensure that they don’t get reset to their defaults.

Requirements

You’ll need a computer running Windows 7 or Windows Server 2008 R2 and a suitable external USB drive to store your .VHD files and to create the necessary bootloader. You’ll also need the following tools:

Process

Disclaimer: This is close to a step-by-step guide, but it assumes a certain level of technical knowledge and understanding. Hopefully I’ve made it as easy to follow and as painless as possible but tread carefully. To quote Scott Hanselman:

“This is some advanced stuff and you may lose a finger. No warranty express or implied.”

To begin with, we need to create our .VHD file. Mike Kolitz has created a fantastic script called WIM2VHD that takes much of the hard work out of this task for us. The example below uses a Windows Server 2008 R2 WIM file as source, and creates a 49GB Enterprise edition dynamically expanding .VHD file from it.

From an elevated command prompt, run the following command:

CSCRIPT WIM2VHD.WSF /WIM:”M:\Sources\SERVER\install.wim” /SKU:SERVERENTERPRISE /VHD:”M:\BootVHDs\W2K8R2ENT.vhd” /SIZE:50176 /DISKTYPE:DYNAMIC

Now that we have created the .VHD file, we need to make some changes to the operating system contained within it. From the same elevated command prompt used for the previous command, we’ll use diskpart.exe to mount the .VHD. Note the use of LIST VOLUME so that we can see the correct volume number, select it, and assign a drive letter to it – you’ll need to change the number in SELECT VOLUME to match your environment:

DISKPART
SELECT VDISK FILE=”M:\BootVHDs\W2K8R2ENT.vhd”
ATTACH VDISK
LIST VOLUME
SELECT VOLUME 8
ASSIGN LETTER=R
EXIT

At this stage, I use the offline servicing tool, dism.exe, to change the default language, keyboard layout and timezone to something more appropriate for the United Kingdom. You can obviously make other changes too if necessary:

DISM /IMAGE:R: /Set-SysLocale:en-GB
DISM /IMAGE:R: /Set-UserLocale:en-GB
DISM /IMAGE:R: /Set-InputLocale:409:00000409
DISM /IMAGE:R: /Set-TimeZone:”GMT Standard Time”

Next, we need to make changes to the registry for each of the six USB device drivers. We’ll use the built in reg.exe command to do this. By default, when an operating system is launched from a dynamically expanding .VHD file using native VHD boot, it expands to its maximum size, reverting to its dynamic size when it is shutdown. I also modify the VirtualDiskExpandOnMount registry value to prevent this:

REG LOAD HKLM\TEMP R:\WINDOWS\SYSTEM32\CONFIG\SYSTEM
REG ADD HKLM\TEMP\ControlSet001\services\usbccgp /v Group /t REG_SZ /d “Boot Bus Extender” /f
REG ADD HKLM\TEMP\ControlSet001\services\usbccgp /v Start /t REG_DWORD /d 0 /f
REG ADD HKLM\TEMP\ControlSet001\services\usbehci /v Group /t REG_SZ /d “Boot Bus Extender” /f
REG ADD HKLM\TEMP\ControlSet001\services\usbehci /v Start /t REG_DWORD /d 0 /f
REG ADD HKLM\TEMP\ControlSet001\services\usbhub /v Group /t REG_SZ /d “Boot Bus Extender” /f
REG ADD HKLM\TEMP\ControlSet001\services\usbhub /v Start /t REG_DWORD /d 0 /f
REG ADD HKLM\TEMP\ControlSet001\services\usbohci /v Group /t REG_SZ /d “Boot Bus Extender” /f
REG ADD HKLM\TEMP\ControlSet001\services\usbohci /v Start /t REG_DWORD /d 0 /f
REG ADD HKLM\TEMP\ControlSet001\services\USBSTOR /v Group /t REG_SZ /d “Boot Bus Extender” /f
REG ADD HKLM\TEMP\ControlSet001\services\USBSTOR /v Start /t REG_DWORD /d 0 /f
REG ADD HKLM\TEMP\ControlSet001\services\usbuhci /v Group /t REG_SZ /d “Boot Bus Extender” /f
REG ADD HKLM\TEMP\ControlSet001\services\usbuhci /v Start /t REG_DWORD /d 0 /f
REG ADD HKLM\TEMP\ControlSet001\services\FsDepends\Parameters /v VirtualDiskExpandOnMount /t REG_DWORD /d 4 /f
REG UNLOAD HKLM\TEMP

The next step is to modify the .INF files so that the operating system does not reset these values to their defaults at any point. As some of the files require SYSTEM permissions to modify them, we use the excellent SysInternals psexec.exe command to launch a command prompt in the SYSTEM security context.

PSEXEC –i –d –s C:\Windows\System32\cmd.exe

From the resultant command window, we use Horst Schaeffer’s INI File Tool to modify any .INF files that might reset the device driver values to their defaults:

INIFILE R:\Windows\inf\usb.inf [StandardHub.AddService] StartType = 0 ; SERVICE_BOOT_START
INIFILE R:\Windows\inf\usb.inf [StandardHub.AddService] LoadOrderGroup = Boot Bus Extender
INIFILE R:\Windows\inf\usb.inf [CommonClassParent.AddService] StartType = 0 ; SERVICE_BOOT_START
INIFILE R:\Windows\inf\usb.inf [CommonClassParent.AddService] LoadOrderGroup = Boot Bus Extender
INIFILE R:\Windows\inf\usbport.inf [EHCI.AddService] StartType = 0 ; SERVICE_BOOT_START
INIFILE R:\Windows\inf\usbport.inf [EHCI.AddService] LoadOrderGroup = Boot Bus Extender
INIFILE R:\Windows\inf\usbport.inf [OHCI.AddService] StartType = 0 ; SERVICE_BOOT_START
INIFILE R:\Windows\inf\usbport.inf [OHCI.AddService] LoadOrderGroup = Boot Bus Extender
INIFILE R:\Windows\inf\usbport.inf [UHCI.AddService] StartType = 0 ; SERVICE_BOOT_START
INIFILE R:\Windows\inf\usbport.inf [UHCI.AddService] LoadOrderGroup = Boot Bus Extender
INIFILE R:\Windows\inf\usbport.inf [ROOTHUB.AddService] StartType = 0 ; SERVICE_BOOT_START
INIFILE R:\Windows\inf\usbport.inf [ROOTHUB.AddService] LoadOrderGroup = Boot Bus Extender
INIFILE R:\Windows\inf\usbstor.inf [USBSTOR.AddService] StartType = 0 ; SERVICE_BOOT_START
INIFILE R:\Windows\inf\usbstor.inf [USBSTOR.AddService] LoadOrderGroup = Boot Bus Extender
INIFILE R:\Windows\inf\brmfcsto.inf [USBSTOR.AddService] StartType = 0 ; SERVICE_BOOT_START
INIFILE R:\Windows\inf\brmfcsto.inf [USBSTOR.AddService] LoadOrderGroup = Boot Bus Extender

Now we delete the precompiled INF files, and copy our modified INF files to appropriate locations. Note that the file locations differ for x64 and x86 builds.

For x64 builds only:
DEL /Q R:\Windows\inf\usb.pnf
DEL /Q R:\Windows\System32\DriverStore\FileRepository\usb.inf_amd64_neutral_e2b28ecac19a29af\usb.pnf
DEL /Q R:\Windows\winsxs\amd64_usb.inf_31bf3856ad364e35_6.1.7600.16385_none_26ed589d28235a16\usb.pnf
DEL /Q R:\Windows\inf\usbport.pnf
DEL /Q R:\Windows\System32\DriverStore\FileRepository\usbport.inf_amd64_neutral_5a41ca742f7973cc\usbport.pnf
DEL /Q R:\Windows\winsxs\amd64_usbport.inf_31bf3856ad364e35_6.1.7600.16385_none_19b7511a1d3ea7fd\usbport.pnf
DEL /Q R:\Windows\inf\usbstor.pnf
DEL /Q R:\Windows\System32\DriverStore\FileRepository\usbstor.inf_amd64_neutral_c301b770e0bfb179\usbstor.pnf
DEL /Q R:\Windows\winsxs\amd64_usbstor.inf_31bf3856ad364e35_6.1.7600.16385_none_a47b405db18421ea\usbstor.pnf
DEL /Q R:\Windows\inf\brmfcsto.pnf
DEL /Q R:\Windows\System32\DriverStore\FileRepository\brmfcsto.inf_amd64_neutral_2d7208355536945e\brmfcsto.pnf
DEL /Q R:\Windows\winsxs\amd64_brmfcsto.inf_31bf3856ad364e35_6.1.7600.16385_none_7fe64f7a6167bcf6\brmfcsto.pnf
COPY /Y R:\Windows\inf\usb.inf R:\Windows\System32\DriverStore\FileRepository\usb.inf_amd64_neutral_e2b28ecac19a29af
COPY /Y R:\Windows\inf\usb.inf R:\Windows\winsxs\amd64_usb.inf_31bf3856ad364e35_6.1.7600.16385_none_26ed589d28235a16
COPY /Y R:\Windows\inf\usbport.inf R:\Windows\System32\DriverStore\FileRepository\usbport.inf_amd64_neutral_5a41ca742f7973cc
COPY /Y R:\Windows\inf\usbport.inf R:\Windows\winsxs\amd64_usbport.inf_31bf3856ad364e35_6.1.7600.16385_none_19b7511a1d3ea7fd
COPY /Y R:\Windows\inf\usbstor.inf R:\Windows\System32\DriverStore\FileRepository\usbstor.inf_amd64_neutral_c301b770e0bfb179
COPY /Y R:\Windows\inf\usbstor.inf R:\Windows\winsxs\amd64_usbstor.inf_31bf3856ad364e35_6.1.7600.16385_none_a47b405db18421ea
COPY /Y R:\Windows\inf\brmfcsto.inf R:\Windows\System32\DriverStore\FileRepository\brmfcsto.inf_amd64_neutral_2d7208355536945e
COPY /Y R:\Windows\inf\brmfcsto.inf R:\Windows\winsxs\amd64_brmfcsto.inf_31bf3856ad364e35_6.1.7600.16385_none_7fe64f7a6167bcf6
EXIT

For x86 builds only:
DEL /Q R:\Windows\inf\usb.pnf
DEL /Q R:\Windows\System32\DriverStore\FileRepository\usb.inf_x86_neutral_e24d8d3fec6e4567\usb.pnf
DEL /Q R:\Windows\winsxs\x86_usb.inf_31bf3856ad364e35_6.1.7600.16385_none_cacebd196fc5e8e0\usb.pnf
DEL /Q R:\Windows\inf\usbport.pnf
DEL /Q R:\Windows\System32\DriverStore\FileRepository\usbport.inf_x86_neutral_ba59fa32fc6a596d\usbport.pnf
DEL /Q R:\Windows\winsxs\x86_usbport.inf_31bf3856ad364e35_6.1.7600.16385_none_bd98b59664e136c7\usbport.pnf
DEL /Q R:\Windows\inf\usbstor.pnf
DEL /Q R:\Windows\System32\DriverStore\FileRepository\usbstor.inf_x86_neutral_83027f5d5b2468d3\usbstor.pnf
DEL /Q R:\Windows\winsxs\x86_usbstor.inf_31bf3856ad364e35_6.1.7600.16385_none_485ca4d9f926b0b4\usbstor.pnf
DEL /Q R:\Windows\inf\brmfcsto.pnf
DEL /Q R:\Windows\System32\DriverStore\FileRepository\brmfcsto.inf_x86_neutral_39ae61431a44cded\brmfcsto.pnf
DEL /Q R:\Windows\winsxs\x86_brmfcsto.inf_31bf3856ad364e35_6.1.7600.16385_none_23c7b3f6a90a4bc0\brmfcsto.pnf
COPY /Y R:\Windows\inf\usb.inf R:\Windows\System32\DriverStore\FileRepository\usb.inf_x86_neutral_e24d8d3fec6e4567
COPY /Y R:\Windows\inf\usb.inf R:\Windows\winsxs\x86_usb.inf_31bf3856ad364e35_6.1.7600.16385_none_cacebd196fc5e8e0
COPY /Y R:\Windows\inf\usbport.inf R:\Windows\System32\DriverStore\FileRepository\usbport.inf_x86_neutral_ba59fa32fc6a596d
COPY /Y R:\Windows\inf\usbport.inf R:\Windows\winsxs\x86_usbport.inf_31bf3856ad364e35_6.1.7600.16385_none_bd98b59664e136c7
COPY /Y R:\Windows\inf\usbstor.inf R:\Windows\System32\DriverStore\FileRepository\usbstor.inf_x86_neutral_83027f5d5b2468d3
COPY /Y R:\Windows\inf\usbstor.inf R:\Windows\winsxs\x86_usbstor.inf_31bf3856ad364e35_6.1.7600.16385_none_485ca4d9f926b0b4
COPY /Y R:\Windows\inf\brmfcsto.inf R:\Windows\System32\DriverStore\FileRepository\brmfcsto.inf_x86_neutral_39ae61431a44cded
COPY /Y R:\Windows\inf\brmfcsto.inf R:\Windows\winsxs\x86_brmfcsto.inf_31bf3856ad364e35_6.1.7600.16385_none_23c7b3f6a90a4bc0
EXIT

The next part is optional. It creates a differencing .VHD from the original file. The allows you to leave the base .VHD file intact and make all subsequent changes to the differencing .VHD instead. It’s a great way of building a base operating system image and then branching it for development work or testing. Once again, make sure you note the correct volume number when doing this. So, from the original elevated command prompt:

DISKPART
SELECT VDISK FILE=”M:\BootVHDs\W2K8R2ENT.vhd”
DETACH VDISK
CREATE VDISK FILE=”M:\BootVHDs\W2K8R2ENT_DIFF.vhd” PARENT=”M:\BootVHDs\W2K8R2ENT.vhd”
SELECT VDISK FILE=”M:\BootVHDs\W2K8R2ENT_DIFF.vhd”
ATTACH VDISK
LIST VOLUME
SELECT VOLUME 8
ASSIGN LETTER=R
EXIT

Now all that is left to do is to create a bootloader on the external USB disk and create an entry for our Native VHD Boot. When you BCDEDIT /COPY {default} below, note the resultant GUID that you are given and use that instead of the {5aaa2c7a-a627-11de-83c7-001372bf1815} listed in the example. So, continuing from the same command window:

BOOTSECT /NT60 M: /FORCE /MBR
BCDBOOT R:\WINDOWS /S M:
BCDEDIT /STORE M:\BOOT\BCD /COPY {default} /d “Windows Server 2008 R2 Enterprise”
BCDEDIT /STORE M:\BOOT\BCD /SET {5aaa2c7a-a627-11de-83c7-001372bf1815} DEVICE VHD=[LOCATE]\BootVHDs\W2K8R2ENT_DIFF.vhd
BCDEDIT /STORE M:\BOOT\BCD /SET {5aaa2c7a-a627-11de-83c7-001372bf1815} OSDEVICE VHD=[LOCATE]\BootVHDs\W2K8R2ENT_DIFF.vhd
BCDEDIT /STORE M:\BOOT\BCD /SET {5aaa2c7a-a627-11de-83c7-001372bf1815} DETECTHAL ON

And that’s it. Reboot your computer, select your external USB disk as your boot device, and you should see the entry you created above. Windows will start, perform the final stages of setup (rebooting a couple of times in the process) and you will be done.

I have personally used this method to store a large number of .VHD files (fixed, dynamic and differencing) and to use them to boot Windows 7 Enterprise and Ultimate in both x64 and x86 platform versions, and the various Windows Server 2008 R2 editions, and found it to be an extremely flexible option.

I’ve even had some success swapping the external USB disk between machines. It doesn’t always work (and to be honest, I haven’t had the time to look any deeper into why) but I’ve used the same native VHD boot instance on a Fujitsu Siemens Celsius H240, Lifebook T4210 and Lifebook S7220, swapping it backwards and forwards between machines and letting Windows manage the driver changes each time without issue.

I’ve also had success with native VHD boot using .VHD files created from Windows Backup and have recently started looking at using the files created from the SysInternals Disk2vhd tool too. Pop back sometime soon and you may even find another guest post documenting those particular adventures…

[MW: Sounds great Garry! Looking forward to it]

Native boot from VHD on a Windows XP computer

This content is 15 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

Guest PostLike almost every other corporate in the world, where Mark and I work there is a standard build deployed to everyone. The default in our particular organisation is a 32-bit Windows XP OS regardless of the capabilities of the laptop or desktop it is deployed to. Over the years, this has caused a number of problems that have required an increasing number of “exemptions” from standard policy to allow people to run a different Windows version or platform.

Whilst this hasn’t been too much of a problem for the majority of the Architects that Mark and I work with – after all, we’re fairly self-sufficient when it comes to supporting our environments and are infinitely capable of collectively dreaming up ever more creative workarounds for the things that don’t work – it isn’t a solution that’s manageable at scale.

Then, along came Windows 7 and Windows Server 2008 R2 and with them came the introduction of a great new feature – Native Boot from VHD. With a little configuration, this has enabled us to leave the existing Windows XP corporate build in place, and to deploy a 32-bit or 64-bit Windows 7 (Enterprise or Ultimate) or 64-bit Windows Server 2008 R2 build side-by-side, crucially without having to make any changes to the Windows XP build or the existing disk partitioning scheme.

To achieve this, we created a new Windows 7 or Windows Server 2008 R2 bootloader, and “chained” the original Windows XP bootloader from it. At boot, this allows us to select a Native Boot from VHD into, for example, a 64-bit Windows Server 2008 R2 Enterprise build, or to select the chained bootloader which allows us to boot into the corporate Windows XP build.

Of course, you’ll need to create your VHD-contained Windows 7 or Windows Server 2008 R2 OS build and put it to your local disk, and this post doesn’t go into that detail, but once you have done that, the steps below will allow you to create a new bootloader and chain your existing Windows XP corporate build from it.

To begin, boot your computer using your Windows 7 or Windows Server 2008 R2 installation media.

When you reach the Install Windows screen, select your preferences in the Language to installTime and currency format, and Keyboard or input method boxes, and then click Next.

Do not click Install now. Instead, click Repair your computer.

The search for supported operating systems will fail, and the System Recovery Options dialog box appears with the Restore your computer using a system image that you created earlier option selected. Click Next.

The Re-image your computer tool will fail to find a system image and will display a dialog informing you of this. Click Cancel on the dialog, and then Cancel again on the main tool window.

The System Recovery Options menu appears. Click Command Prompt.

To write the new Windows 7 or Windows Server 2008 R2 bootloader:

BOOTSECT /NT60 C: /FORCE /MBR

To create a BCD store from the Windows VHD:

DISKPART
SELECT VDISK FILE=C:\BOOTVHDS\W2K8R2ENTX64.VHD
ATTACH VDISK
ASSIGN LETTER=X
EXIT
BCDBOOT X:\WINDOWS /S C:

Set up the VHD native boot:

BCDEDIT /SET {default} DEVICE VHD=[LOCATE]\BOOTVHDS\W2K8R2ENTX64.VHD
BCDEDIT /SET {default} OSDEVICE VHD=[LOCATE]\BOOTVHDS\W2K8R2ENTX64.VHD
BCDEDIT /SET {default} DETECTHAL ON

Set up the legacy boot:

BCDEDIT /CREATE {ntldr} /d "Chain Legacy Bootloader"
BCDEDIT /SET {ntldr} DEVICE PARTITION=C:
BCDEDIT /SET {ntldr} PATH \ntldr
BCDEDIT /DISPLAYORDER {ntldr} -ADDLAST

To put things back to normal, should you ever need to:

BOOTSECT /NT52 C: /FORCE /MBR