[for Windows 7 read this post

In my daily work I use a lot of Virtual PC images (VHD) so my host Vista system will stay clean of beta and test software. To get to the files I stored inside a Virtual PC images I normally start the Virtual PC and drag and drop them to my host system. This can be more efficient using the command line tool VHDMount. You mount the VHD and can read and write the files like a normal hard disk in your host system. By importing a small registry file you don’t need the command line anymore and can mount and unmount (dismount) the VHD.

VHD Mount

This is what you need to do to mount a VHD inside Vista by double clicking.

  1. Microsoft Virtual PC
    1. Download "Microsoft Virtual PC 2007" from the following link:
      http://www.microsoft.com/windows/downloads/virtualpc/default.mspx
    2. Install "Microsoft Virtual PC 2007" normally by double clicking.
  2. Microsoft VHD Mount
    1. VHD Mount is part of "Microsoft Virtual Server 2005 R2 SP1".
    2. Download "Microsoft Virtual Server 2005 R2 SP1 - Enterprise Edition" from the following link:
      http://www.microsoft.com/downloads/details.aspx?familyid=bc49c7c8-4840-4e67-8dc4-1e6e218acce4&displaylang=en
    3. Install (using the custom setup option) only the VHD Mount tool.
  3. Double clicking VHD integration in Vista
    1. Create a text file and rename it to vhdmount.reg.
    2. Edit the vhdmount.reg file and add the following lines:

      Windows Registry Editor Version 5.00
      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD]

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell]
      @="Mount"

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Dismount]

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Dismount\command]
      @="\"C:\\Program Files\\Microsoft Virtual Server\\Vhdmount\\vhdmount.exe\" /u /c \"%1\""

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Mount]

      [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Virtual.Machine.HD\shell\Mount\command]
      @="\"C:\\Program Files\\Microsoft Virtual Server\\Vhdmount\\vhdmount.exe\" /p \"%1\""

      [HKEY_CLASSES_ROOT\.vhd]
      @="Virtual.Machine.HD"

    3. Run the vhdmount.reg file.