Step by step guide install Windows 10 using boot to VHD feature

Windows 10 is coming this year, as technology enthusiast I always interested to tryout and explore features set and developer opportunities. In this blog post I will explain how to install and explore windows 10 safely on your computer without using virtual machine software or creating new partition in your hard drive.

Boot to VHD

Boot to VHD is feature in Windows 7 (higher) system , that allows to boot windows operating system from the VHD file ( virtual hard disk file ). Basically Windows 7 systems boot loader understands , how to boot from VHD file. I wrote blog post how to do it for Windows 7 (here). In this blog post I will show how to do it on Windows 8 .

First thing download windows 10 iso file from Microsoft site. You can download the iso file by be joining Microsoft Windows insider program.

Create VHD/VHDX file from the ISO.

  • Download the Convert-WindowsImage.ps1 PowerShell script from TechNet site that allows you to create VHD/VHDX file from ISO.Launch PowerShell command  prompt as administrator, execute command to enable execution of unsigned scripts ,

Set-ExecutionPolicy Bypass -Scope Process

  • Run downloaded script in interactive mode by executing .\Convert-WindowsImage.ps1 –ShowUI command . At the end of the execution it scripts creates vhdx file  in the working directory.


  • Mount the virtual hard disk image from working directory.


  • Once image is mounted  you should be able to see new drive in your explorer. In my case it is attached ‘G’ drive.



Update boot record.

  • Now run following command create new bootable entry. Replace G:\Windows with your location where vhdx image is mounted

bcdboot G:\windows


  • Verify that boot order is updated properly by running msconfig.exe. You should see new entry.


  • Restart computer , you should new boot option.

Uninstall Windows 10 (Removing boot entry).

If you want to remove boot entry you can follow the steps

  • Launch msconfig.exe from the admin command prompt  and select entry you want to delete and press delete, reboot.





Create Bootable VHD from the Windows 7/Windows 8/Windows 2012 ISO

In my previous blog post I explained how to use windows 7 Boot to VHD feature to dual boot computer without installing OS in different partition.

To use this feature you need to have VHD file with OS installed. This blog post points to resource that allows you to create bootable VHD from Windows 7/Server 2008 R2 and Windows 8/Server 2012 setup media.

Technology used to create VHD is already built into Windows 7 and higher, in the form of Virtual Hard Disk & Windows Imaging Interface API, these API are exported from virtdisk.dll and Wimgapi.dll.

Following blog post explains how to use these built-in API in PowerShell script

Note: PowerShell script referred in the blog post is no longer available , use the alternative link here


  1. Virtual Hard disk API reference.
  2. Windows Imaging API reference.
  3. Windows 8 Enterprise 90-day evaluation.
  4. New Windows 8 specific  PowerShell script for creating bootable VHD.

Simple way to try new Windows OS using Boot to VHD

Try out new windows 8 release preview  or  windows server 2012 operating systems without install using Boot to VHD.

Boot to VHD is feature in Windows 7 (higher) system , that allows to boot windows operating system from the VHD file ( virtual hard disk file ). Basically Windows 7 systems boot loader understands , how to boot from VHD file.

Typical way of using boot to VHD feature involves , using command line tools such as diskpart and bcdedit which is cumbersome. Recently I was watching videos from TechEd North America 2012 , in one of the session presenter showed simple way to do the same.

Advantage of using boot VHD  over running in virtual machine ( Virtual Box or VMWare workstation) is  , OS present in VHD will get full access to actual physical hardware instead of virtualized hardware. This will allow OS perform better compared to virtual machine.

Here are the steps,

1. Download Windows Server 2012 VHD file from Microsoft site.   If you want Windows 8 release preview  , you need to create one. I will explain how in the next blog post.

2. Once you have VHD file , use run disk management tool “diskmgmt.msc”.

3. Select “Attach VHD” option from the “Action” Menu.


4. “Select/Enter” path to VHD location


5. Windows will mount the VHD and assigns drive letter. Note down the drive lettter. In my case it is mount as “G” drive. Now from the explorer you can see the “G” drive.


6. Launch command prompt in “Administrator” mode. Type following command to make entry in the windows boot loader

c:\Windows\system32\bcdboot G:\Windows

Note: Replace “G” with the drive letter depending on you system where VHD is mounted.


7. Launch “msconfig.exe” from the “Administrator” command prompt to verify that new boot entry is added in the boot loader.


You can change the boot order from here.

Note: Replace “G” with the drive letter depending on you system where VHD is mounted

8. If you reboot the system, now you will have option to boot into new OS.

9. Using same steps you can try out new Windows 8 client OS , if you have VHD file.


1. Windows 2012 RC VHD file

2. Creating Windows 8 Release preview VHD from ISO.

3. Watch “The Busy Developer’s Guide to Virtualization”  talk on Channel9

Microsoft All-In-One Code Framework

Often you will looking for code samples to solve certain programing tasks.
Code samples will help in  understanding available operating system API’s and it usage.

All-In-One Code Framework  is code samples library provided by Microsoft. More than 3500 quality code samples covering various technical topic ranging from System programming,Device Driver programming, Windows Azure,ASP.NET ,Office SharePoint etc. Samples will be available both for Native ( C++,MFC ) and .NET developers.

Microsoft All-In-One Code Framework  has “Sample browser” application , that helps you to find the code samples written by the Microsoft team.
These sample are based on request from developer communities, customers and typical  programming scenarios.



To find the code samples
Visit and download the application. This application is based on click once technology.

Once it is downloaded , you can launch the application and search for samples by entering the query in the search box.
You can also apply search filter based on programming language ( C++,C#,VB.NET ) and technology.
Following picture shows the search results for “Mutex” with C++ filter.




More information can be found from

1. Codeplex website

2. Channel9 Resource

3. How to use video on developer channel

Yesterday at build conference Microsoft released details about Windows 8. Windows 8 is available on Intel and ARM platform.

For developer they are lot of interesting capabilities. Till now if you had to develop windows desktop application , you had to learn C++ ( win32,mfc) .C# or VB.  In windows 8 that capability has expended to all web developer who knows html  JavaScript and css.

Here is how developer stack looks. All the capability is of windows are exposed via WinRT API ( brand new runtime ) , programming environment is built on top of the WinRT API, so whether you are C++ developer or JavaScript developer you will get the same capability .

You can watch the walkthrough video via channel 9 link

Also you can download windows 8 and check yourself. Installation does not requires any activation and ISO images comes with the developer tools to developer application on windows 8.