Create a H.I.D image in several minutes :)

Discussion in 'backup, imaging & disk mgmt' started by Divenow, Mar 24, 2012.

Thread Status:
Not open for further replies.
  1. Divenow

    Divenow Registered Member

    Joined:
    Sep 18, 2010
    Posts:
    37
    Create a Sysprepped vhd image from Windows 7 (Vista/8?) sources using CMD and restore it to a PC!

    First download:

    AIK 7: http://www.microsoft.com/download/en/details.aspx?id=5753

    and

    AIK 7 SP1: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=5188


    Then download WIM2VHD.WSF script from:

    http://archive.msdn.microsoft.com/wim2vhd/Release/ProjectReleases.aspx?ReleaseId=2603

    and put it in C:\

    After you have installed AIK, go to C:\Program Files\Windows AIK\Tools and copy imagex.exe to C:\

    Note: There is different version of imagex.exe in the folders amd64, ia64 and x86 so choose depending on your cpu.

    Extract or mount and copy windows 7 iso to C:\WinSetup

    Then open a elevated CMD and type:

    cd C:\

    cscript wim2vhd.wsf /wim:c:\WinSetup\sources\install.wim /sku:ultimate

    Note: "sku" is the version of windows you want to use, so change it if you dont want ultimate.

    After several mintes it will finish and you will have a VHD file that is a 5gb but is expandable to 40 gb. You can boot your VHD natively or in a VM.

    Now you can use "Image for windows" or another imaging software to create an image of that VHD and then restore it to a PC. So you have a hardware Independent image that will boot into OOBE when restored (After restore it will install drivers, reboot, let you change language settings / username and it will reboot once more before booting into windows).

    It took me 3-4 min to create the vhd, 2 min to image it with IFW and 3 minutes to restore it my PC with IFW WinPE on USB stick. Alot faster then installing windows, doing sysprep. Also you can integrate hotfixes and other stuff to the extracted windows 7 source, like you do normally and then use the script to create a VHD.

    Note: If you use IFW you should be able to mount the VHD directly and then restore it to your HDD.

    Credits to: http://www.hanselman.com/blog/StepByStepTurningAWindows7DVDOrISOIntoABootableVHDVirtualMachine.aspx
     
    Last edited: Mar 25, 2012
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.