Windows 10: Apply Windows Image using DISM Instead of Clean Install

Discus and support Apply Windows Image using DISM Instead of Clean Install in Windows 10 Tutorials to solve the problem; How to: Apply Windows Image using DISM Instead of Clean Install [img] Information The most boring part of computing is waiting operating system to... Discussion in 'Windows 10 Tutorials' started by DavidY, Oct 5, 2017.

  1. DavidY Win User

    Apply Windows Image using DISM Instead of Clean Install


    How to: Apply Windows Image using DISM Instead of Clean Install

    Apply Windows Image using DISM Instead of Clean Install [​IMG]
    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), 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.




    Contents [/i] Click links to jump to any part

    [table][tr][td]Part One:[/td] [td]Boot & Partitioning[/td] [/tr] [tr][td]Part Two:[/td] [td]Apply Windows image[/td] [/tr] [tr][td]Part Three:[/td] [td]Done![/td] [/tr] [/table]




    Part One [/i] 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:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    1.2) If disk is unallocated, click New:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    (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:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    1.4) Click OK:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    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:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    UEFI / GPT:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    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.


    Apply Windows Image using DISM Instead of Clean Install [​IMG]
    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:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]



    Apply Windows Image using DISM Instead of Clean Install [​IMG]
    Note Advanced users can of course use DISKPART to partition HDD / SSD instead of steps told above.




    Part Two [/i] Apply Windows image
    2.1)
    Back on Windows Setup screen, press SHIFT + F10 to open Command Prompt:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    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 /WimFileApply Windows Image using DISM Instead of Clean Install :D:\Sources\install.wimESD based install media (ISO made using Media Creation Tool):dism /Get-WimInfo /WimFileApply Windows Image using DISM Instead of Clean Install :D:\Sources\install.esd
    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    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 /ImageFileApply Windows Image using DISM Instead of Clean Install :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

    Apply Windows Image using DISM Instead of Clean Install [​IMG]





    Part Three [/i] Done!
    3.1) Close Command Prompt, close Windows Setup:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    3.2) Setup thinks now you want to cancel installation, not knowing that Windows has already been installed *Wink. Just click Yes to let PC restart:

    Apply Windows Image using DISM Instead of Clean Install [​IMG]


    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

    :)
     
    DavidY, Oct 5, 2017
    #1
  2. Trybird Win User

    Cannot restore the system image

    Hi,

    If previously in Windows Recovery Environment you had already used dism /Capture-Image command to capture the images of your laptop's hard disk partitions into your external hard drive as backups before formatting, now you can apply these images (.wim) files
    to your laptop again, namely
    enter Windows Recovery Environment from a booting Windows installation media (like Windows installation disc)
    , then use
    dism /Apply-Image command to apply the images to your laptop's formatted hard disk partitions.

    For more information about dism /Apply-Image command's options and its arguments, please specify an option immediately before /?.

    e.g.

    dism /Apply-Image /?

    Please refer to
    here
    .

    Good luck.
     
    Trybird, Oct 5, 2017
    #2
  3. Installing Windows 10 from an ISO image

    Can one mount a .esd image using DISM, inject drivers and add packages, unmount the image, then use Win PE and DISM to apply that modified image to a drive? Can DISM operate on .esd files just like on .wim files?
     
    SysAdminTCS, Oct 5, 2017
    #3
  4. Kari Win User

    Apply Windows Image using DISM Instead of Clean Install

    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.
     
    Kari, Oct 6, 2017
    #4
  5. DavidY Win User
    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?
     
    DavidY, Oct 7, 2017
    #5
  6. Kari Win User
    I am not sure at which point EFI and WinRE will be populated, can't find any documentation about it.
     
    Kari, Oct 7, 2017
    #6
  7. D4ni3l Win User
    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


    Apply Windows Image using DISM Instead of Clean Install [​IMG]









    Apply Windows Image using DISM Instead of Clean Install [​IMG]
     
    D4ni3l, Oct 7, 2017
    #7
  8. cereberus Win User

    Apply Windows Image using DISM Instead of Clean Install

    Hi @Kari,

    After todays online forums, I gave this a go (installing as dual boot). I ran into a couple of problems:-

    1) I just cannot boot from a 17128 iso no matter what I try. I got round this by booting from a Macrium Reflect Winpe image and running Dism from there, and it worked fine. Hell it is a lot faster!

    I then booted into my normal windows, and added a boot entry. Then I ran into next problem.


    2) I selected the 17128 installation from the dual boot menu, and it just would not boot into the new installation, just getting into a reboot loop and eventually ending back at dual bot menu after quite some time. I then used the Macrium Deploy option and selected the 17128 installation and BAM - it booted straight to OOBE in seconds.

    Running deploy, it complained about the standard SATA controller and let me install the AMD version, which I always had to manually install after a clean install, and worked. So I am guessing there is some incompatibility with the standard windows SATA controller and 17128 (1803 versions) on AMD pc.

    Now I know what to do, I can clean install fine on host pc now.

    Many thanks for advice and this great guide, even if I do it a little differently.


    Thinking about it, I probably do not even need to boot to a winpe drive to run dism if installing a dual boot?

    Edit: Indeed, dism can be run from normal windows to clean install a dual boot version. Very nice.


    So key steps:-

    Create an install.wim using @Kari's uuptoiso tool.

    Shrink C drive by say 50GB

    Create new partition in newly unallocated space

    Deploy image with dism from an admin command prompt

    Add boot entry from admin command prompt

    Boot pc - select new installation

    Beauty of this method is you an carry on using existing windows for most of it.

    Obviously, if not dual booting i.e. only single booting, you will have to boot first into a win pe environment to run dism etc.
     
    cereberus, Mar 23, 2018
    #8
  9. This should work , Thanks
     
    Josey Wales, Mar 24, 2018
    #9
  10. cereberus Win User
    You can also use this to install to a virtual hard drive instead of creating a new partition. Using Macrium Reflect Redeploy as I did is a little trickier as you have to attach the virtual disk from the Macrium Reflect Command prompt first using diskpart commands, but only take a minute to do.
     
    cereberus, Mar 26, 2018
    #10
  11. cereberus Win User
    Today, I tried an experiment - I wanted to clean install Skip Ahead in a hyper-v vm, and normally it takes ages on my laptop. I followed the guide booting from skippy iso up to point of having created all the required partitions, and then shutdown VM.

    I then went to host, and attached vhd as a drive using disk management, and used dism from host to deploy OS instead.

    I then detached vhd from host, and booted to skippy iso, and created boot entry, booted vm and it went as I hoped straight to oobe.

    Doing dism on host rather than in vm is much quicker on my laptop.

    I then made a copy of vhd, mounted as drive in host, made a boot entry. I tried rebooting to host but it failed as cases in previous post. I rebooted into Macrium Reflect, added vhd using diskpart and ran Macrium Redeploy, and as before BAM on rebooting, straight to oobe.

    Doing it this way, means I can install on vm and dual boot on host with essentially only one main installation phase. You have to do it via vm first to ensure drive has all the partitions needed to boot in vm.
     
    cereberus, Mar 31, 2018
    #11
  12. KabyBlue Win User
    @Kari @cereberus

    I have two questions...

    >> Why do you think applying the image is faster than the traditional USB method (via USB 2.0 or 3.0) -- just curious?

    >> When creating the boot entry via "bcdboot G:\Windows" command, if the " /s " flag isn't used to designate where the boot files should be added too, does Windows automatically know which partition to add the boot entry too? What if there was another disk (such as Disk 1) or primary partition.
     
    KabyBlue, Mar 31, 2018
    #12
  13. cereberus Win User

    Apply Windows Image using DISM Instead of Clean Install

    Windows just knows where the bcd is it seems. I am guessing dism has been updated to search for an existing EFI even in a winpe environment.

    I am guessing here (@Kari may advise) that you would only need to use the /s if trying to create a fully bootable drive with its own EFI partition rather than modifying the exiting EFI partition.

    This would only make sense if you wanted a fully independent drive to boot from selecting boot drive from bios.

    I assume it is faster as dism is just more efficient, and cuts out all the internet, driver checking phases, multiple reboots etc.
     
    cereberus, Mar 31, 2018
    #13
  14. Kari Win User
    Installing on GPT disk on UEFI systems, boot records will be on C: drive by default. No need to use /s switch. On MBR disk / BIOS system, if the switch is not used, boot records will be stored on C: drive but using the switch you can store them on System Reserved (or another) partition.

    Note that on MBR disk, you also need to mark partition containing boot records active with DISKPART after adding deployed Windows with BCDBOOT.


    Deploying with DISM does not decrease amount of reboots. The deployment phase has no reboots, the same when running a traditional clean installation until OOBE starts. The reboots will then occur when OOBE takes over from Windows installation, be it a deployment with DISM or running Windows Setup from install media.
     
  15. cereberus Win User
    Yeah of course you correct about reboots in deployment phase.
     
    cereberus, Mar 31, 2018
    #15
Thema:

Apply Windows Image using DISM Instead of Clean Install

Loading...
  1. Apply Windows Image using DISM Instead of Clean Install - Similar Threads - Apply Image using

  2. Dism doesnt apply image to partition, 2 errors

    in Windows 10 Gaming
    Dism doesnt apply image to partition, 2 errors: Hello everyone,Im trying to apply install.wim to partition x: which is ntfs. But nothing happens. This is the command Ive used and the log entries.DISM DISM.EXE: Executing command line: dism /apply-image:C:\Users\Musa.Semi\Desktop\install.wim /index:1 /ApplyDir:X:\DISM DISM...
  3. Dism doesnt apply image to partition, 2 errors

    in Windows 10 Software and Apps
    Dism doesnt apply image to partition, 2 errors: Hello everyone,Im trying to apply install.wim to partition x: which is ntfs. But nothing happens. This is the command Ive used and the log entries.DISM DISM.EXE: Executing command line: dism /apply-image:C:\Users\Musa.Semi\Desktop\install.wim /index:1 /ApplyDir:X:\DISM DISM...
  4. Using DISM with a downloaded image

    in Windows 10 Gaming
    Using DISM with a downloaded image: I'm trying to repair a windows 10 installation that is unstable even in safe mode.Within the recovery environment sfc reports errorsdism / online failsso I'm trying to use DISM with a downloaded image on a USB drive.wmic logicaldisk get name shows the USB drive as drive E:...
  5. Using DISM with a downloaded image

    in Windows 10 Software and Apps
    Using DISM with a downloaded image: I'm trying to repair a windows 10 installation that is unstable even in safe mode.Within the recovery environment sfc reports errorsdism / online failsso I'm trying to use DISM with a downloaded image on a USB drive.wmic logicaldisk get name shows the USB drive as drive E:...
  6. Using DISM with a downloaded image

    in Windows 10 Installation and Upgrade
    Using DISM with a downloaded image: I'm trying to repair a windows 10 installation that is unstable even in safe mode.Within the recovery environment sfc reports errorsdism / online failsso I'm trying to use DISM with a downloaded image on a USB drive.wmic logicaldisk get name shows the USB drive as drive E:...
  7. Access Denied when using DISM to apply image

    in Windows 10 Installation and Upgrade
    Access Denied when using DISM to apply image: I am trying to migrate to a larger M.2 Drive in my Dell Laptop. I created a 64Bit WinPE USB drive, booted to that drive, used DISM to capture WIM files of the smaller M.2 drive. I then swapped out the M.2 Drive, booted to the USB drive, Created the partitions, tried to...
  8. Using Dism to capture and apply windows 10 images to a partition

    in Windows 10 Support
    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. Now I have a lot of...
  9. creating usb pen for dism apply-image

    in Windows 10 Installation and Upgrade
    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 24718
  10. Dism /Apply-Image and remove the entire content of the directory

    in Windows 10 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: Code: Dism /Apply-Image /ImageFile:"<wim_File_Path>\install.wim" /Index:1 /ApplyDir:"<Apply_Directory_Path>" /Verify /CheckIntegrity Dism /Capture-Image...

Users found this page by searching for:

  1. how to install windows in laptop with install.wim and dism command

    ,
  2. dism apply image

    ,
  3. why does dism fail to apply my wim onto my target directory?