Dism script

Discussion in 'Windows 8' started by anybastard, Sep 24, 2013.

  1. anybastard

    anybastard MDL Novice

    May 9, 2007
    35
    0
    0
    Hello guys ,

    I hope that is the right forum section .

    My target is image a disk ( w8 ) with multiple partitions ( C - D - E ) using DISM tool .

    Now there is no problem to image a single partition one by one .

    My target is make a script that read the disk partions and make automatically the images of all partitions present into the disk

    Do you know if possible and or do you have some suggestion for me ? :rolleyes:

    Thanks in advance for your suggestion and / or help

    BRs
    AnyB.
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    #2 abbodi1406, Sep 24, 2013
    Last edited by a moderator: Apr 20, 2017
    1 wim:
    Code:
    @echo off
    DISM /Capture-Image /ImageFile:Custom.wim /CaptureDir:C:\ /Name:"Partition C" /Compress:max
    for %%A in (D E F G H I J K L M N O P Q R S T U V W X) do (if exist %%A:\Windows\DesktopTileResources\resources.pri DISM.exe /Append-Image /ImageFile:Custom.wim /CaptureDir:%%A:\ /Name:"Partition %%A")
    
    separate wim's:
    Code:
    @echo off
    for %%A in (C D E F G H I J K L M N O P Q R S T U V W X) do (if exist %%A:\Windows\DesktopTileResources\resources.pri DISM.exe /Capture-Image /ImageFile:Custom.wim /CaptureDir:%%A:\ /Name:"Partition %%A" /Compress:max)
    
     
  3. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #3 Mr Jinje, Sep 24, 2013
    Last edited by a moderator: Apr 20, 2017
  4. anybastard

    anybastard MDL Novice

    May 9, 2007
    35
    0
    0
    Hi guys ,

    thanks a lot for your advices . I will try immediatly and if there is some problem I will disturb you again

    Brs
    AnyB
     
  5. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,964
    907
    60
    Are you doing this offline? If so, there's no guarantee the drive letters will be in the same order. Hidden partitions? System Partition? UEFI also has a msr partition which you can't back up...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. anybastard

    anybastard MDL Novice

    May 9, 2007
    35
    0
    0
    Yes, I'm doing this task offline , about the driver letter I will fix them by diskpart script and is the same for the other partitions that I cannot backup . About the hidden partition I think that is ok only assign a letter and this is possible by diskpart .

    Currently my focus is image several partitons ( same disk ) without user interaction . I'm checking Mr Jinje script but there is a problem when on the target unit is present an external HDD ( I'm using it to store the wim images ) because it is present on device ID list o_O

    BRs
    AnyB.