Apply Windows Image using DISM Instead of Clean Install

    Apply Windows Image using DISM Instead of Clean Install

    How to Apply Windows Image using DISM Instead of Clean Install to Reduce Time
    Published by Category: Installation & Upgrade
    13 May 2017
    Designer Media Ltd

    Published by


    Kari's Avatar
    Finnish but not finished


    Location: A Finnish expat in Germany
    Posts: 12,949

    Show Printable Version 


    information   Information
    The most boring part of computing is waiting operating system to be installed. Installing Windows 10 can take anything from 10 to over 30 minutes (depending on hardware). The low end i5 laptop I am using to write this tutorial with an HDD instead of SSD takes on average of 35 minutes from booting with install USB flash drive to OOBE to start with region selection dialog after last restart required by setup, additional 3 to 4 minutes to get initial user created and wait Windows preparing user profile and getting to desktop.

    Of course on state of the art hardware, especially using SSD instead of HDD the time needed to install is only about a third of what I need with this hardware.

    Whatever hardware you have, applying Windows install image with DISM (Deployment Image Servicing and Management tool) instead of traditional clean install will significantly reduce the time needed to install Windows. Especially when installing using a customized and personalized Windows image with pre-installed software (see tutorial) you can reduce the time by up to over 50% but even when using a standard Windows install media you get Windows installed at least over 20% faster.

    You can use any valid Windows 10 install media, be it made from a self made ISO from Windows Insider or Feature Upgrade (tutorial), a WIM based original ISO Microsoft has available for Windows Insiders (download link in tutorial), or an ESD based ISO made with Media Creation Tool (download link in tutorial).

    This tutorial although written for Windows 10 also applies to Windows 7, 8 & 8.1.





    Apply Windows Image using DISM Instead of Clean Install Contents Apply Windows Image using DISM Instead of Clean Install
     Click links to jump to any part


    Part One: Boot & Partitioning
    Part Two: Apply Windows image
    Part Three: Done!




    Apply Windows Image using DISM Instead of Clean Install Part One Apply Windows Image using DISM Instead of Clean Install
     Boot & Partitioning

    1.1)
    Boot PC from Windows install media (DVD or USB flash drive), continue as in normal clean install until you get to disk options screen. Skip the product key when asked:
    Name:  Skip key.png
Views: 3545
Size:  24.4 KB

    1.2) If disk is unallocated, click New:
    Name:  Allocate 1.png
Views: 2966
Size:  25.8 KB

    (If hard disk is already partitioned as you wish, jump to step 1.5. If you want to wipe an already partitioned disk select existing partitions one by one, select Delete, and when done continue from 1.3.)

    1.3) Set the preferred size of Windows partition (#1 in screenshot) and click Apply (#2). If you want to use whole disk for a single Windows partition just accept default value and click Apply:
    Name:  Allocate 2.png
Views: 2950
Size:  42.2 KB

    1.4) Click OK:
    Name:  Accept allocation.png
Views: 2947
Size:  25.7 KB

    1.5) On BIOS based machine with MBR disk setup will now create the required System Reserved partition (500 MB) using the rest of allocated space for Windows partition.

    On UEFI based machine with GPT disk the Recovery partition (450 MB), EFI System partition (99 MB) and Microsoft Reserved partition (MSR, 16 MB) will be created, rest of the allocated space being used for Windows partition.

    1.6) Select the partition where Windows will be installed (Primary partition) and click Format.

    BIOS / MBR:
    Name:  Format C MBR.png
Views: 2963
Size:  117.8 KB

    UEFI / GPT:
    Name:  Format C GPT.png
Views: 2961
Size:  37.4 KB

    1.7) If you did not allocate whole disk for Windows partition, you can leave rest of the disk now unallocated. When Windows has been installed you can use Disk Management to partition remaining space as you wish.

    Tip   Tip
    If you want to allocate a specific amount of space for Windows partition, add 500 MB on BIOS / MBR systems and 565 MB on UEFI / GPT systems.

    Example (MBR):
    • You want to have a 150 GB Windows partition on a BIOS / MBR system, you should allocate 154,100 MB
      (150 * 1024 MB = 153,600 MB = 150 GB plus 500 MB for System reserved partition)

    Example (GPT):
    • You want to have a 250 GB Windows partition on a UEFI / GPT system, you should allocate 256,565 MB
      (250 * 1024 MB = 256,000 MB = 250 GB plus 450 MB Recovery, 99 MB EFI and 16 MB MSR partitions)


    1.8) Setup does not show any message when formatting is done. Only indicator of progress is mouse pointer; when formatting, pointer will be an hourglass icon. When ready normal arrow pointer will be shown. Formatting even big hard disks only takes a few seconds.

    1.9) When Windows partition has been formatted close Disk Options dialog. This takes you back to Windows Setup screen:
    Name:  Exit partitioning.png
Views: 2959
Size:  41.6 KB

    Note   Note
    Advanced users can of course use DISKPART to partition HDD / SSD instead of steps told above.





    Apply Windows Image using DISM Instead of Clean Install Part Two Apply Windows Image using DISM Instead of Clean Install
     Apply Windows image

    2.1)
    Back on Windows Setup screen, press SHIFT + F10 to open Command Prompt:
    Click image for larger version. 

Name:	SHIFT+F10.jpg 
Views:	101 
Size:	70.9 KB 
ID:	134902

    2.2) Type diskpart and press Enter to start Disk Partition Utility (see #1 in screenshot in step 2.5)

    2.3) Type list vol and press Enter to see list of volumes / partitions (#2). Note the temporarily assigned drive letters for your newly formatted Windows partition and install media (#3). You recognize Windows partition from its size and install media by its type, Removable if using USB flash drive or DVD-ROM if using a DVD install media

    2.4) Type exit and press Enter to quit Disk Partition Utility (#4)

    2.5) Enter following command to check correct index for your preferred Windows 10 edition replacing highlighted drive ID letter with your actual install media ID (#5). Note the index# for edition you want to install (#6):

    WIM based install media (Insider or self made ISO):
    dism /Get-WimInfo /WimFile:D:\Sources\install.wim
    ESD based install media (ISO made using Media Creation Tool):
    dism /Get-WimInfo /WimFile:D:\Sources\install.esd
    Name:  Diskpart DISM Index.jpg
Views: 2876
Size:  107.8 KB

    2.6) In this example case now the temporary drive ID for partition where I want Windows to be installed is G:, Windows install media (USB drive) is D:, and as I want to install Windows 10 PRO the index# is 1. That's all information I need to apply Windows image (install.wim or install.esd file from Sources folder on install media).

    2.7) Enter following command, replacing drive ID letters and Windows edition index# with your actual ones (#1 in screenshot in step 2.9):

    dism /Apply-Image /ImageFile:D:\Sources\install.wim /index:1 /ApplyDir:G:\

    • ImageFile = Path to install.wim file on install media (install.esd file on media created with Media Creation Tool)
    • ApplyDir = temporary drive ID for partition where Windows will be installed followed by :\

    2.8) DISM will now apply Windows image to selected partition (G: in this example). This partition will get the correct drive ID C: when image has been applied and Windows restarted. When DISM is ready you can check that Windows system folders have been created with DIR G: command (#2)

    2.9) Only one thing missing: we need to create boot records with BCDBOOT command. We can find it on newly created Windows partition, in Windows\System32 folder. Enter following command to write boot records to make hard disk bootable (#3):

    G:\Windows\System32\bcdboot G:\Windows
    Click image for larger version. 

Name:	Write boot records.jpg 
Views:	156 
Size:	73.9 KB 
ID:	134905





    Apply Windows Image using DISM Instead of Clean Install Part Three Apply Windows Image using DISM Instead of Clean Install
     Done!

    3.1) Close Command Prompt, close Windows Setup:
    Name:  Close setup.jpg
Views: 2827
Size:  22.6 KB

    3.2) Setup thinks now you want to cancel installation, not knowing that Windows has already been installed . Just click Yes to let PC restart:
    Name:  Yes - finish setup.jpg
Views: 2822
Size:  21.7 KB

    3.3) Windows will now restart booting from hard disk entering the final phase of setup, Windows Welcome (OOBE) Mode. Select your region, add initial user profile and you are done


    That's it!

    Kari
  1.    05 Oct 2017 #1
    Join Date : Jan 2014
    Posts : 1,391
    Windows 10 Pro (32-bit) 16299.15

    Hi Kari,
    Does this tutorial include setting up the Recovery partition?
    I wondered if another step was required to copy winre.wim onto there, and then a reagentc step to link to it?
      My ComputerSystem Spec
  2.    07 Oct 2017 #2
    Join Date : Oct 2013
    A Finnish expat in Germany
    Posts : 12,949
    Windows 10 Pro
    Thread Starter

    Quote Originally Posted by DavidY View Post
    Hi Kari,
    Does this tutorial include setting up the Recovery partition?
    I wondered if another step was required to copy winre.wim onto there, and then a reagentc step to link to it?
    Sorry for delayed reply.

    If you follow the instructions in this tutorial to the letter, EFI, WinRE and MSR partitions will be created exactly as when doing a traditional install. No additional actions are required.
      My ComputerSystem Spec
  3.    08 Oct 2017 #3
    Join Date : Jan 2014
    Posts : 1,391
    Windows 10 Pro (32-bit) 16299.15

    Quote Originally Posted by Kari View Post
    Sorry for delayed reply.

    If you follow the instructions in this tutorial to the letter, EFI, WinRE and MSR partitions will be created exactly as when doing a traditional install. No additional actions are required.
    Thanks Kari,

    I did try it out in the end, and as you say, it does populate the recovery partition with the recovery tools.
    I wondered what point that gets done - is it during the OOBE phase I wonder?
      My ComputerSystem Spec
  4.    08 Oct 2017 #4
    Join Date : Oct 2013
    A Finnish expat in Germany
    Posts : 12,949
    Windows 10 Pro
    Thread Starter

    I am not sure at which point EFI and WinRE will be populated, can't find any documentation about it.
      My ComputerSystem Spec
  5.    08 Oct 2017 #5
    Join Date : Oct 2016
    Posts : 134
    Microsoft Windows 10 x64

    this nice method works on Hyper-V Virtual Machine also

    I attached a Windows ISO 1703 (April 2017) as the first DVD for boot
    I put a copy of [ 16299.15.170928-1534.rs3_release_clientconsumer_ret_x64fre_en-us...........esd ] (Sept 2017) on an second ISO DVD with ImgBurn

    I followed your instructions above

    I now have a clean W10-1709 virtual machine

    So simple in fact when you know

    thanks Kari

    some pictures









    Last edited by D4ni3l; 08 Oct 2017 at 08:08.
      My ComputerSystem Spec

 


Similar Threads
Tutorial Category
Apply Windows 10 Enterprise image via USB
I have taken an image using DISM and it is in the .wim format. I want to apply it to a tablet using a usb stick, it has a UEFI Bios. in the past with windows 7 and I have been able to create a bootable usb drive by using Windows 7 USB DVD tool to...
Installation and Upgrade
Windows 8 desktop background image returned on Win 10 clean install?
This isn't a major problem, but I would just like to understand how it happened. Some background. This is a Windows 10 clean install on a new SSD drive. The original HDD is still in the computer with a corrupt version of Windows 8 on it. My...
Customization
Using Dism to capture and apply windows 10 images to a partition
Hi guys, so a few days ago my windows 10 crashed so I had to format and reinstall windows 7 then upgrade to windows 10, a hard work to do. So I started to search about how to capture the image of C: where the windows 10 is running and I found Dism....
General Support
Dism /Apply-Image and remove the entire content of the directory
Hi I installed Windows ADK 10 v1511 on Windows 10 v1511 Enterprise 64 bit. I typed the following commands: Dism /Apply-Image /ImageFile:"<wim_File_Path>\install.wim" /Index:1 /ApplyDir:"<Apply_Directory_Path>" /Verify /CheckIntegrity...
General Support
Solved creating usb pen for dism apply-image
I have managed to create a USB pen drive to apply WIM images using the DISM Apply-image command in 64bit so I know it can be done but any ideas how to create a pen to apply 32bit WIM images
Installation and Upgrade
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 02:05.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums