How-To Geek

How To Seamlessly Dual-Boot Windows 7 and Windows 8 (The Easy Way)


Keen to try out Windows 8, but aren’t quite ready to give up on Windows 7 just yet? Follow this fun easy guide to get the best of both worlds.

Creating The VHD

To create the VHD, go to a run prompt by pressing Win+R, and type diskmgmt.msc.

An MMC console will appear, and will have the Disk Management snap-in pre-loaded.

To create a new VHD, click on the action button in the menu  bar, and select Create VHD.

Now you need to choose a location for the VHD file and set the size, which should be no less than 20 GB. You should probably choose a fixed size for best performance.

Windows will then create the VHD, the progress of this can be viewed in the Status Bar of the MMC snap-in.

Once the disk is created it will be in the list of partitions in the Disk Management console. You’ll want to initialize the disk by clicking on it and selecting initialize.

Leave the partition style at MBR(Master Boot Record) and click ok.

Once the disk has been given a partition style, we now need to create an actual volume on the partition. To do this right click on the black space and select “New Simple Volume”.

A wizard will open, you can just accept all the defaults until you get to this screen. Here change the Volume label to “Windows 8”, then click next and finish.

Now you have a new VHD file that is acting like a real hard drive.

Installing Windows 8 On The VHD

The first thing you need to do is open PowerShell as an administrator by opening Start Menu->All Programs->Accessories->Windows Powershell, right-clicking on the Windows PowerShell shortcut, and choosing Run as Administrator.

When PowerShell launches you will need to change the execution policy to allow you to run scripts. To do this, you need to type “Set-ExecutionPolicy RemoteSigned”. You will be given a security notice just type “Y” and press enter to accept. Once you have done this, leave the PowerShell window open as we will be using it again just now.


Next you need to download this script from MSDN, and then move it to the root of the C: Drive. Note that you could move it somewhere else if you want, but just change the rest of the instructions to use the alternate path.

Right-click on the file and select properties.  Click the unblock button in the bottom right hand corner.

Now you will need to mount the the .ISO file that you downloaded from the Windows Developer website. If you don’t know how to mount an ISO file check out our guide. Once you have mounted the .ISO image switch back to the PowerShell  window. Now type “CD C:\” to switch to the root of the drive.


Now type  the following command into the shell window:

.\Install-WindowsImage.ps1 –WIM D:\Sources\Install.wim –Apply –Index 1 –Destination I:\

You should substitute the drive letter that comes after the –WIM for the drive of the mounted DVD image, and substitute the destination drive letter, in our case this is E:\ for the VHD that you created in the first section of this article. Then press enter.


Once it has completed you will be notified.


Now open an elevated command prompt, and type bcdboot.exe I:\Windows (assuming that I:\ is the drive with Windows 8 on it).

Now when you boot Windows you will be greeted with the new OS Choosing Screen.


Seamless File Sharing

The last thing you will want to do is make your files available to both operating systems. To do this boot into your new Windows 8 installation and navigate to:

C:\Users\[Your User Name]

Now right click on the Contacts folder and select Properties from the context menu. Switch over to the location tab and click on the move button.


Now navigate to the Contacts folder on your Windows 7 drive, this can be found at the same path, however your user name might be different to the one you used in Windows 8.


Click on the ok button and your good to go, repeat this for the following folders:

  • Desktop
  • Downloads
  • Favorites
  • Links
  • My Documents
  • My Music
  • My Pictures
  • My Videos

That’s all there is to it.

Taylor Gibb is a Microsoft MVP and all round geek, he loves everything from Windows 8 to Windows Server 2012 and even C# and PowerShell. You can also follow him on Google+

  • Published 03/13/12

Comments (61)

  1. Kazi Shantonu

    Now how to uninstall it?

  2. Gunzo

    Probably just delete the VHD from the disk manager within win7

  3. Nathan

    “Move”? You’re kidding me? Move all desktop, contacts etc OFF Win7 and onto Win8?
    Surely you mean to copy them.

  4. Taylor Gibb

    @Nathan it doesnt move anything off your Windows 7 install, you are simply moving the path that Windows 8 looks for that information, it all still stays on you Windows 7 install.

  5. Gaitch32

    I am wondering if just deleting the VHD is enough. Wouldn’t you have to do something with the MBR or the Windows 8 selection would still come up but just go nowhere?

  6. Tom C.

    @Gaitch32: Indeed, if you only delete the VHD, you will receive a error message everytime you are booting your computer! You also have to delete the corresponding boot entry (via bcdedit).
    BTW: You can do this A LOT faster (and stay with the W7 boot manager) if you create the VHD during the installation of W8 (via diskpart; create vdisk; select vdisk; attach vdisk) … Use Google to find the exact description, as I can only offer a german version ;-)

  7. SeaBee

    “Now you will need to mount the the .ISO file that you downloaded from the Windows Developer website.”

    I didn’t know that I had. Where can I find it? Help please.

  8. Doug

    I just installed W8 on my netbook using a partition on my HD and a DVD rather, than the VHD and .iso file. I ended up with the same dual boot capability. If a person has a DVD drive and the W8 media, it looks to me like you should be able to just boot from the DVD and procede with the installation, making sure you install on the VHD.
    Is there any reason this wouldn’t work when the destination drive is a VHD rather than a real HD partition?
    I found a video driver for my netbook that allows the video to be set to 1024×768 and now the metro UI functions normally. It’s not as crisp as native video, and the image is stretched a bit, but it works well.

  9. nileshrathi

    I’m getting the following error when I’m trying to create the boot files in cmd
    BFSVC: Failed to set element application device. Status = [c00000bb]
    Any idea?

  10. Qrazydutch

    1. Install oracle virtual box on your system and then U can install ANY OS PERIOD


  11. Siddharth

    I’d installed Windows 8 DP by using VHD method that you’d described in one of your previous articles.
    I now want to upgrade to Windows 8 CP.
    What would be the best method, upgrade Windows 8 DP from within Windows 8, or to delete the old VHD (the one with Windows 8 DP) and create a new VHD for Windows 8 CP?

  12. rockhead

    virtualbox can’t instal win8 CP in everyway, from iso, usb or optical drive
    how come?

  13. Qrazydutch

    Hardware compatibility…also turn on all options….I don’t advocate oracle…it just seems to me that people install beta on “live” system… My point keep BETA sobware off ur standard stuff so it cannot muck u up (MUU)….sound u make when u get hosed by microsob….
    I play safe. I run lubuntu Linux with oracle virtual box and dual boot with win7….no issues and I can always get rid of any OS w/o issues play safe play smart..

  14. Rob

    It appears that removing the Windows 8 VHD is as simple as booting into Win7 and running msconfig…

    This blog also shows another way to do the install (boot from the Win8 DVD, create/install the VHD on the fly).

  15. Robyn

    I read in an earlier htg article that it wasn’t going to be possible to dual-boot to Win8 and another OS. I was prepared to not upgrade Windows any more at all because of this myopic M$ view, to be honest. Does this mean, QrazyDutch, that – with a virtual HD configuration – dual-booting Ubuntu/Windows8 is going to be possible? Perhaps not with GRUB, though, right?

  16. Bru

    This is supposed to be “The Easy Way”? Arrrrrrrrrrrrgh! I cannot get the script to run in Powershell no matter how many times I try to unblock it. The error reads: The script will not run because it is not digitally signed (or something to that effect).

  17. Bru

    Oracle doesn’t work either — so much for “Seamlessly”! Also, why does a Windows OS reject and ask you to uninstall MSE — which is their own Security System — sounds fishy to me.

  18. Taylor Gibb

    @Bru to temporarily fix this just change your execution policy, so open powershell and type Set-ExecutionPolicy Unrestricted. Now try run your script, something is wrong in your config, this will be a temporary fix. When you done with the script run Set-ExecutionPolicy Restricted.

  19. lori

    I have the same issue as Bru!

  20. Bru

    @ Taylor: Thanks — but now my VHD has disappeared from the Management Console. I tried to re-create it, but the system says the file already exists — why is it not appearing in the list? This is really, really frustrating!

  21. Bru

    “Next you need to download this script from MSDN, and then move it to the root of the C: Drive. Note that you could move it somewhere else if you want, but just change the rest of the instructions to use the alternate path.”

    – I have the feeling that this part of the instructions may be where my problem lies — there’s not enough detail — please elaborate step-by-step. I’m getting more error messages in PowerShell. By mounting the install files I suppose that having the Windows 8 install program create a bootable flash drive accomplishes the same task?


  22. Nasser

    Friends, the instructions are clear and I think the author did a great job. Everything worked nicely without and problem the first time. Thanks HTD.

  23. Joe Winograd

    Everything worked perfectly until the command. I can’t get past that because my Sources folder does not have an file. The only .wim file in the Sources folder is . I downloaded the ISO three times and tried it from the hard drive, a USB flash drive, and a DVD drive. All three do not have an file in the Sources folder. Any ideas? I’m tantalizingly close! Thanks, Joe

  24. Mason

    The last step , Seamless file sharing.. how do I undo it once I change it. When I go to properties again I have lost the location tab.Thanks

  25. Joe Winograd

    Seems that this board mishandles less-than and greater-than signs, which I like to use to set off file names, so the post above doesn’t make sense. I’ll try again again using brackets.

    Everything worked perfectly until the [Install-WindowsImage.ps1] command. I can’t get past that because my Sources folder does not have an [install.wim] file. The only .wim file in the Sources folder is [boot.wim]. I downloaded the ISO three times and tried it from the hard drive, a USB flash drive, and a DVD drive. All three do not have an [install.wim] file in the Sources folder. Any ideas? I’m tantalizingly close! Thanks, Joe

  26. mason

    joe , you must download the [Install-WindowsImage.ps1] file separately , the link is located right after the vhd instructions. They tell you to download the file from MSDN, ….MSDN will be in blue , Thats the link.

  27. mr.x

    awesome guide….

  28. Joe Winograd

    I did download the [Install-WindowsImage.ps1] file separately. That’s not the problem. The script is there and it executes fine. The problem is that a parameter to the script is [D:\Sources\Install.wim]. That file does NOT exist in my Sources file of the W8 ISO, so of course the script fails because it can’t find that file…because it doesn’t exist.

  29. Joe Winograd

    “my Sources file” above should have said “my Sources folder”.

  30. Joe Winograd

    FWIW, the only files in my Sources folder with file name [install] are [install.esd] and [install.exe]; likewise, the only file in my Sources folder with file type [.wim] is [boot.wim]. Anyone else seeing this or does everyone have [install.wim] in their Sources folder?

  31. Joe Winograd

    OK, figured it out. I created the ISO via the Consumer Preview setup, not the direct ISO download. The former creates [install.esd] in the Sources folder; the latter creates [install.wim] in it. Very interesting!

  32. BillyB

    Can anyone help as my VHD as dissapeared from the list?

    I know it still exists somewhere as my free space on my C: has reduced by 20GB

  33. Blackduckrun

    “The EASY way” ??!! You’ve got to kidding!

    The easy way is to run Windows 8 on a spare Pentium 3 you have lying around.

    Good Grief!

  34. JvD

    I did the following according to your description:
    – Created a VHD (on an empty hard disk E:) and called it W:
    – In PowewrShell changed the ExecutionPolicy to Y.
    – Downloaded Install-WindowsImage.ps1 and moved it to the root of C:
    – Unblocked the security property
    – Downloaded Windows8-ConsumerPreview-32bit-English.iso, moved it to the root of E:
    – Downloaded and installed Virtual CloneDrive
    – Doubleclicked on Windows8-ConsumerPreview-32bit-English.iso in oder to mount it. It did not open anything, but I assume is was mounted.
    So far, so good (I hope).
    – In the PowerShell window wrote the line:
    .\install-windowsimage.ps1 -wim e:\install.wim -apply -index 1 -destination w:\

    I wondered what the command install.wim is. Could not see it. In any case I got the error message:
    Cannot validate argument on parameter ‘WIM’. The ” Test-Pat
    h $_ ” validation script for the argument with value “e:\install.wim” did not return true

    Where did I go wrong?

  35. Jeff Burns

    *** HELP ***
    It all worked except for one detail. I set up a 25GB virtual drive which had the letter “G” assigned. I substituted the letter G as directed in the various steps. The instructions do not show any step where I would be changing the drive letter. When I got to the step of booting into Windows 8 for the first time, it worked EXCEPT that it calls the virtual drive the “C:” drive. I am now unable to point back to my files under Windows 7? What was my C: drive under Windows 7 is no longer listed under Disk Management? It’s like it disappeared.

    I AM still able to boot into Windows 7 and have it work perfectly. Windows Explorer under Windows 7 shows the prior C: drive correctly.

    I have reviewed the install instructions and I find nothing telling me that the G: drive would later appear as C:? Am I dead in the water here?

  36. gaitch32

    I had no problem with the guide. It worked just as it was stated. However for the file sharing, I just added the Document, Pictures, Video, etc from the other OS folders to the library for each one and then removed the original one in Windows 8 from the library. Now everything saves to the other OS but looks like it belongs in Windows 8.

  37. Roman Berry

    I left a previous comment that appears to be stuck in “awaiting moderation” purgatory, perhaps (and I’m just guessing here) because it has a link to another tech web site, so let me see if I can come up with a post that is acceptable…

    There is a much easier way to go about all of this. No PowerShell. No scripts. No extracting WIM files. You can do all of this with just the Win 8 boot media by installing to the VHD.

    1. Create your VHD. 20 gigs or more. Once created, stop. Don’t worry about initializing or formatting.

    2. Boot with your Win 8 media. USB or DVD. Doesn’t matter.

    3. Follow the Win 8 installation wizard until you get to the point where you need to select the destination partition for installation. Hit shift+F10 to bring up a command prompt.

    4. At the command prompt, Type in Diskpart and press Enter. Then:

    DISKPART:>select vdisk file=[drive letter:]\vms\[your.vhd]

    DISKPART:>attach vdisk

    5. Exit the command prompt and select refresh from the “Where do you want to install Windows” menu. This will populate your VHD to the list of available partitions.

    6. Select your VHD as the destination partition from the list and do the standard install.

    7. That’s it. Reboot and you’ll have your choice of Win7 or Win8 on the boot menu.

  38. Roman Berry

    @Taylor Gibb: I assume my email address is available to you. Email me if you don’t mind. There’s something I’d like you to see.

  39. ckc

    ??? D:\Sources\Install.wim

    My file VHD’s >> D:\WIN 8

    Partion i want to install Win 8 : G

    How do I have to type command ?

    I’m a Vietnam

  40. ckc

    ohhhh i done

    Thanks Taylor Gibb and Joe Winograd

  41. Andy Johnson

    I have tried to follow these instructions verbatim, but I keep ending up with an error at character 27 of the install routine.

    .\Install-WindowsImage.ps1 –WIM D:\Sources\Install.wim –Apply –Index 1 –Destination I:\

    Which is the -HIM position, I cant get past it.

  42. RA

    Do I need to use the activation key from the Microsoft website?

  43. RA

    It didn’t work, I got a bsod twice, it said VHD_INITALIZATION_FAILED

  44. ME

    When i get to the part just after mounting .ios What root of which drive should i switch to? the c drive of my main os? or the root of the drive where I am installing os8?

  45. Andy Johnson

    I have determined that when I create a vhd drive in W7 and have to reboot to start W8 installation, the vhd drive has mysteriously disappeared.
    I followed the directions at diskmgmt.msc explicitly, still no luck.
    How do I get it to STAY?

  46. Lee Frederickscii

    Thanks Taylor! I installed Windows 8 CP this way,the day it came out(I had already done the same with the DP). I will be dual-booting this way from now. It’s easy indeed!

  47. sam

    Will this method reduce speed of the win 7?

  48. Sai Praneeth

    hello Taylor,
    IAM SAI can u tell me weather u need to getinto the bios

  49. Liz

    Thanks for this tutorial! It was really easy to follow and everything worked! However, there was one glitch. Windows 8 booted no problem, but when I decided to go to Windows 7, I got a BSOD. Rebooting fixed it, though.

  50. Wildchild

    I wish I’d found this article sooner.

    I created a partition (20 GIG, called it the X drive) and installed Win 8 on it. It works just fine.

    The problem is, the PC only boots into Win 8 now. When I look at the disks, Win 8 is the C drive, not the X drive like I expected. I can see the other drive (Now labeled E) with Win 7 on it. All the data is fine and accessible.

    Is there anyway now to get this to dual boot into either OS?

    Thanks for any help.


  51. reon

    I tried all the steps and it worked fine until the last part which is bcdboot.exe g:\windows
    It gave the error: “Failure when attempting to copy boot files.”

    Can anyone help me with this error?

  52. reon

    sorry. solved it. didn’t realise the instruction to use an elevated command prompt window

  53. reon

    Now getting this error whenever loading windows 8… vhd_boot_initialization_failed

  54. JP

    I’ve writen this and yes H is the driver
    C:\Install-WindowsImage.ps1 -WIM H:\Sources\Install.wim -Apply -Index 1 -Destination R:\
    And i am getting this:
    C:\Install_WindowsImage.ps1 : Cannot validate argument on parameter ‘WIM’. The ” Test-Patch $_” validation script for the argument with value “H:\Sources\Install.wim” did not return true. Determine why the validation script failed and then try the command again.
    At line:1 char:33
    + C:\Install-WindowsImage.ps1 -WIM <<<< H:\Sourcws\Install.wim -Apply -Index 1 -Destination R:\
    + categoryInfo : InvalidData: [Install-WindowsImage.ps1], ParameterBindingValidationException
    + FullyQualifiedErrorID : ParameterArgumentValidationError,Install-WindowsImage.ps1
    So please help find a solution and thanks

  55. JP

    Fixed everything and now getting this from cmd
    BFSVC: Failet to open handle to resume object. Status = [c0000034]

  56. soumen

    hey …fr me evrything is dne….the last problem during booting its sayng failure when attempting to copy boot files, u help me out

  57. Louis

    15 min. had passed …still not done?…why?

  58. Solrac

    I keep having an Error…

    PS C:\> .\Install-WindowsImage.ps1 -WIM H:\Sources\Install.wim -Apply -Index 1 -Destination B:\
    File C:\Install-WindowsImage.ps1 cannot be loaded. The file C:\Install-WindowsImage.ps1 is not digitally signed. The sc
    ript will not execute on the system. Please see “get-help about_signing” for more details..
    At line:1 char:27
    + .\Install-WindowsImage.ps1 <<<

    How do I fix it? I’ve followed every single step acording to the guide…

  59. Mac Hillary

    What happens after you select the “WINDOWS 8” option from the bott menu?
    How do we setup Windows 8 after all this??

  60. Engineer

    .\Install-WindowsImage.ps1 –WIM D:\Sources\Install.wim –Apply –Index 1 –Destination I:\

    this command didn’t work for me.
    what can i do now ?

  61. Kode

    Hi I installed it and it works great. I was just wondering is there a way to access the programs on the windows 7 drive without going through the whole setup process?

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!