How to install Windows 8 on your laptop in just 45 minutes

The process of installing the Windows 8 Consumer Preview isn't difficult. Follow these steps and get to testing Microsoft's new OS in under an hour.

You can put the Windows 8 client on your laptop -- for free -- in 30 minutes or less! (Preparation takes extra...

time.) If you want to kick the tires of Microsoft's newest product for work or pleasure, you can install it on your current laptop or desktop with little risk.

I don't recommend using your company's production workstation because IT administrators frown upon that sort of thing. In addition, your organization probably has some sort of encryption such as McAfee Endpoint Protection or BitLocker, and while there might be ways to get around this, it's probably not worth the effort because it's better to install Windows 8 on a non-production machine.

There are several download options for Windows 8. Follow the link to "Windows 8 Consumer Preview Online Install," download a 5 MB .exe file, and make sure there is a connection to the Internet. Once you run the .exe file, it pulls the files from Microsoft's site, and Windows 8 should run pretty smoothly.

Figure 1A
Figure 1A
Figure 1B
Figure 1B

For this discussion, however, we need the International Organization for Standardization (ISO) image. You can download the ISO from Microsoft. Burn it to a DVD or open and mount it with a third-party utility such as MagicISO. There are a couple of interesting features in the Windows 8 setup. Figure 1A shows the Setup screen that summarizes the apps and devices. Figure 1B shows the compatibility report that lists the devices and apps on my machine as well as which ones will and won't work. I can then take steps to correct the problem.

Just like Windows 7, the Windows 8 Consumer Preview can be installed in a virtual hard disk (VHD), and the machine can be booted from the VHD. Windows 2008 R2 and Windows 8 Server can also be installed to a VHD. This means you can boot multiple configurations and operating systems from one physical server. This is better than relying on virtual machines (VMs) because you are truly running on physical hardware rather than having the hypervisor and all the virtual devices separate your Windows installation from the hardware.

If you are testing products or software for Windows 8, it is better to test on the actual hardware rather than in a VM. It's easy to configure a computer that can boot to various flavors of Windows 7, Windows 8 or their server equivalents, in addition to having various OS flavors running different apps or versions of apps.

Another benefit of using these configurations is that just like with a virtual machine, if you mess it up, you can always boot to another configuration (VHD), delete the problematic one, and rebuild it.

There are a couple of ways to do this -- an easy way and a slightly more complicated way, depending on what you want.

The Easy Way

You can get Windows 8 on your Windows 7 laptop in just a few minutes longer than the installation takes.

  1. From a Windows 7 client , boot the Windows 8 DVD.
  2. When setup asks, "Where do you want to install Windows?" hit SHIFT-F10 to get to WinPE.
  3. At the WinPE command prompt, use Diskpart to create the VHD:

DISKPART> create vdisk file=d:\VMs\Win8.vhd  type=expandable maximum=60000
DISKPART> select vdisk file=d:\VMs\Win8.vhd
DISKPART> attach vdisk
DISKPART> create partition primary

Alternatively, you could create the VHD prior to booting the Windows 8 DVD and use Diskpart to attach it with the following commands (point to the .vhd file you created):

Diskpart>Select vdisk file=d:\vms\win8.vhd

Diskpart>attach vdisk

4. Return to Setup. When it gets to the screen asking for the disk location, the VHD will show up. Setup will continue and install Windows 8.


  • Windows 8 Boot Manager will be installed, replacing Windows 7 boot manager. Don't do this if you are on your company laptop and are afraid of the IT police. But I did it on my non-production laptop, and it is fine.
  • BCDEdit is modified so you see Windows 8 in the boot menu just like in the old dual-boot days.
  • The Windows 8 WIM (Windows Imaging file format) is applied to the VHD, avoiding lots of work found in the more complicated way below. 

A more complicated but more powerful method

The procedure described above is great for a quick install, but what if you want to build some testing, development, training or sandbox environments with apps? The following procedure will allow you to boot custom WIM files, Sysprepped images, etc. and is relatively simple and well documented. I've learned, however, to open some options and avoid pitfalls. Here are three steps to create the bootable VHD.


  1. Obtain a WIM image of Windows 8 (or whatever Windows version you want to install).
  2. Obtain a copy of Imagex.exe, a Microsoft utility in the Windows Automated Installation Kit (WAIK).
  3. Use a computer with sufficient disk space. The client versions of Windows 7 and Windows 8 require about 15 GB of disk space for a minimal installation.


  1. Create a VHD.
  2. Put the WIM and imagex.exe on the C: drive.
  3. Use imagex commands to copy the WIM image to the VHD.
  4. Use BCDEdit to build a boot file to boot the VHD.

If you are holding me to the 45-minute timeline, note that the three most time-intensive operations will be copying the WIM file, creating the VHD and running imagex to copy the Windows image to VHD. Your mileage may vary.

Preparing a machine for the Windows 8 Consumer Preview

First, create a directory to hold the files required for this process. I used C:\VHD. Open up a couple of administrator-level command windows.

Obtain a WIM File. The easy way to get a WIM file is from the Windows ISO image or DVD. Starting with Windows 7, Microsoft began using WIM files rather than having all the files in the i386 directory. WIM is a single file that is stored in the \Sources directory on the DVD or ISO image. Note that they are always called "install.wim," so if you have multiples, give them a descriptive name.

WIM files can be built and customized with specific drivers, language packs and applications. There are a number of tools to do this, but my favorite is the Microsoft Deployment Toolkit, which can be used to build custom WIM files. For our purposes, we'll use the default install.wim from the Windows DVD or ISO image.

Action: Copy the WIM file to C:\VHD (or whichever directory you are using).

Obtain a copy of imagex.exe. This is the toughest part of this process. download Imagex.exe, which is available in 32-bit and 64-bit formats.

Action: Copy imagex.exe to C:\VHD.

Build the VHD

This can be done using the Disk Management snap-in to the Microsoft Management Console (MMC) or the Diskpart command-line tool.

Using Disk Management MMC

Figure 2
  1. Create the VHD.
    • In the Disk Management MMC, select Apply, then select Create VHD.
    • In the Create and Attach VHD wizard (see Figure 2):
      • Browse to "dir C:\VHD" and enter a file name such as "Win8Preview.vhd." Remember to make the file name descriptive because you may want to have several different images.
      • Although Windows 7 needs only about 7 GB, you should give it at least 15 GB.
      • Select fixed-disk size. While a dynamic disk may save disk space, the dynamic disk must have the full expanded size in free disk space when it boots or it will fail to. Always use a fixed disk for a VHD boot.
      • Select OK to build the VHD. It takes a while; look to the lower-right corner of the computer management snap-in to see its progress.
  2. The VHD will now show up as a disk in Disk Management. Right-click and initialize the disk. The VHD disk should now show online.
  3. Right-click on the VHD disk, select Simple Volume -- New Simple Volume Wizard, and fill in the specifications as needed.
  4. Note that in the disk properties, you can select Attach VHD (mount) if it is unattached or Detach VHD (unmount) if it is attached.
Figure 3

Using DiskPart (for scripting)

(See Figure 3.)

C: Diskpart

DISKPART> List Disk (lists all disks)

DISKPART> Select Disk 0 (select disk where current OS is loaded)

DISKPART> List Vol (the OS is typically loaded on C:)

DISKPART> Create vdisk file="c:\vhd\Windows8.vhd" maximum=200000 (Note that the default type is Fixed. Use the Type option for Dynamic (expandable). The maximum is the disk size in megabytes. Make sure the file name is in quotation marks.)

DISKPART> Select vdisk file="c:\vhd\Windows8.vhd" (Select the disk to which the following commands will apply.)

DISKPART> Attach vdisk

DISKPART> create partition primary

DISKPART> assign letter=E

DISKPART> format quick FS=NTFS label=Win8Preview


Use imagex to apply the WIM file (Windows image) to the VHD

Figure 4
  1. Use the command: imagex /info c:/vhd/install.wim to dump the information (see Figure 4). The Index value shows the version of Windows. The Index value of 1 in Windows 7 WIM indicates the Enterprise edition. Currently, there is only one version of Window 8.
  2. Apply the WIM file to the VHD (in this case, the VHD is the E: drive): imagex /apply c:\vhd\install.wim 1 E:\
    The 1 between the WIM file path and the destination drive letter indicates that we want to install the Enterprise version. Note that this will take a while.

Modify the boot menu with BCDEdit

Figure 5
  1. BCDEdit <enter> shows the current boot options with which we are going to copy the {current} entry to a new entry.
  2. The boot menu will show BCDEdit /copy {current} /description "Win8 Preview VHD".
  3. BCDEdit shows a new entry with the Identifier = {Guid} (see Figure 5).
  4. Select the {GUID} string in the paste buffer with the mouse, then hit Enter.
  5. Enter BCDEdit /set {paste Guid here} Device VHD=[C:]\vhd\Win8Preview.vhd.
    In the VHD= option, enter the path to the .vhd created earlier in this process. Note that the drive letter of the path is in square brackets.
  6. Use the up arrow key and recall the last line and edit it as follows:
    BCDEdit /set {Guid} OSDevice VHD=[C:]\vhd\Win8Preview.vhd
  7. Type BCDEdit /set {Guid} DetectHAL ON.

If you want to start over, just delete the previous boot-loader section:

BDCEdit /delete {Guid}

The other parameters can be changed (if you make a typo in the VHD path, for instance) just by retyping the command using corrected parameters.

Warning: Booting the machine and selecting the Windows 8 boot option will ultimately end in a fatal error. This is because Windows 8 can't use the Windows 7 boot manager. The Windows 8 boot manager has to be installed. It's easy to do, but it is destructive, so reconsider if this is a production machine.

The command, when booted to Windows 7, is:

C:\windows\system32\bcdboot.exe  F:\Windows

Now reboot the machine. The boot manager will show the new entry "Win8 Preview VHD" and will proceed through the install process.

Advanced Options

There are some additional options that will help create the test environment.

Creating additional VHDs and bootable images

  • Create VHDs using Diskpart or the Disk Management snap-in. Label each one to reflect the image it is used for.
  • Create the WIM files and remember to use the Microsoft Deployment Toolkit or other tool to create custom WIMs.
  • Use Sysprep to neutralize the VHD image. Just like virtual machines, boot to the VHD image and run Sysprep or another utility to strip out specific information, such as the security identifier and the machine name. This allows a library of VHDs to be copied to other computers and remain on the network. (Also see my article on how to Sysprep a machine.)
  • Use the MDT Deployment Wizard to acquire and deploy a WIM image. Check out a video of someone who goes to a lot of extra work playing with VMware, but if you cut through that, it's pretty good.

Using the boot from the VHD feature in the Windows 8 Consumer Preview and Windows 7 (including the server versions) turns any computer in to a lab. Once you have set this up, the possible configurations that could help you in your job are limited only by the disk space on the machine.

Dig Deeper on Windows 8 and 8.1