Windows Integration Guide - murphy78

Discussion in 'Windows 8' started by murphy78, Sep 5, 2013.

  1. ultimate_live

    ultimate_live MDL Expert

    Mar 15, 2011
    1,022
    671
    60
    No problem with time to integrate. Which are the comands to integrae the 6 KB files for each index ?
     
  2. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,399
    340
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. phox

    phox MDL Junior Member

    Jan 10, 2010
    81
    2
    0
    What is wrong with this command:

    G:\!Work\GDism\x86\DISM\DISM.exe /Capture-Image /ImageFile:G:\Temp\install.wim /CaptureDir:I:\ /Name:”Win811Pro” /compress:max

    It is not writing win name?!
     
  4. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,754
    240
    #304 murphy78, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    For each index? You could make a for /l loop something like this:
    Code:
    for /l %%x in (1, 1, 10) do (
    dism /mount-wim /mountdir:c:\win81\sources\install.wim /index:%%x /mountdir:c:\mount
    dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2919442-x86.msu
    dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2939087-x86.msu
    dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2919355-x86.msu
    dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2932046-x86.msu
    dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2937592-x86.msu
    dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2938439-x86.msu
    dism /unmount-wim /mountdir:c:\mount /commit
    dism /export-image /sourceimagefile:c:\win81\sources\install.wim /sourceindex:%%x /destinationimagefile:c:\temp\install.wim /compress:max /checkintegrity
    )
    But if you follow more about the update, you'll know that you should integrate the hotfixes in the winre.wim and /resetbase that
    I ended up doing it for one winre.wim and just went around copy/pasting them into the same architecture - different indexes since the pre-integration sha1 hashes matched...

    Or you could take s1ave77's advice and just use MSMG's toolkit. It's a lot easier, even if it's intimidating at first.
     
  5. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,330
    91,595
    340
    Use " not ”
     
  6. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,754
    240
    #306 murphy78, Mar 18, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Looks good to me, though you could add the description if that's what you meant...
    I would also add /checkintegrity and /verify Example:
    Code:
    dism /capture-image /imagefile:g:\temp\install.wim /capturedir:I:\ /compress:max /checkintegrity /verify /name:"Win811Pro" /description:"Some long drawn out boring-ass description that perfectly describes your index during setup"
     
  7. phox

    phox MDL Junior Member

    Jan 10, 2010
    81
    2
    0
    #307 phox, Mar 20, 2014
    Last edited by a moderator: Apr 20, 2017
  8. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,754
    240
    I haven't played with unattended files very much.
    You could probably look up a few google searches on win81 versions or advice.
     
  9. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,330
    91,595
    340
  10. phox

    phox MDL Junior Member

    Jan 10, 2010
    81
    2
    0
    #310 phox, Mar 20, 2014
    Last edited: Mar 20, 2014
    I have it, but "<TimeZone>Central Europe Standard Time</TimeZone>"
    and "<ComputerName>Compy</ComputerName>" are not accepted?!
     
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,330
    91,595
    340
    Don't know, they look good to me
     
  12. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
    Hi,
    Thanks for this very nice guide...
    I have a question.
    Is it OK, Instead of running:
    imagex /compress maximum /export c:\win81\sources\install.wim * c:\temp\install.wim
    Run:
    imagex /compress maximum /export c:\win81\sources\install.wim 1 c:\temp\install.wim
    So instead of using * I use the only image index number I actually need, which is number 1
    Well, I found that it saved some more space on the final DVD...
    Also I think you could also cover the Dism /Get-WimInfo /WimFile: topic somewhere in the guide.
    Thanks again!
     
  13. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,754
    240
    #313 murphy78, Mar 23, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Guys I need help figuring out how to list indexes in a install.wim from a winpe script.
    The current /get-imageinfo is much too spammy.

    Code:
    Deployment Image Servicing and Management tool
    Version: 6.3.9600.16384
    
    
    Details for image : c:\win81x86\sources\install.wim
    
    
    Index : 1
    Name : Windows 8.1 Enterprise
    Description : Windows 8.1 Enterprise
    Size : 8,642,379,940 bytes
    
    
    The operation completed successfully.
    I need to get it down to a number and the name
    Something like this:
    Code:
    1. Windows 8.1 Pro
    2. Windows 8.1 Pro with Media Center
    3. Windows 8.1 Enterprise
    4. Windows 8.1 Enterprise N
    I'm thinking some sort of FOR command, but I don't know enough about it to help display the piped /get-imageinfo command...
    Does anyone have any idea how to do this?
     
  14. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,093
    24,399
    340
    #314 s1ave77, Mar 23, 2014
    Last edited by a moderator: Apr 20, 2017
    :D ... something like this... :g::

    Code:
        for /f "tokens=2 delims=: " %%a in ('DISM /Get-WimInfo /WimFile:"%path2%" ^| findstr /i Index') do (
            for /f "tokens=2 delims=:" %%g in ('DISM /Get-WimInfo /WimFile:"%path2%" /Index:%%a ^| findstr /i Name') do (
            echo %%a.%%g
            )
        )
    
    OUTPUT:

    MultiEdition Win 8.1 WIM

    Code:
    1. Windows 8.1 Pro with Media Center
    2. Windows 8.1 Pro
    3. Windows 8.1
    Win 7 x64 WIM (MSDN default)

    Code:
    1. Windows 7 HOMEBASIC
    2. Windows 7 HOMEPREMIUM
    3. Windows 7 PROFESSIONAL
    4. Windows 7 ULTIMATE
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,754
    240
    #315 murphy78, Mar 23, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Perfect man thanks s1ave77!
    I'm trying to make like a menu'd setup program that will diskpart prep a selected disk and has options to do wimboot, swm splits application, and index selection
    I'm not particularly happy with needing tons of diskpart txt files to import depending on which disk you want to install to, but maybe if I work up a first draft of this nonsense, people can help me refine it.

    EDIT: hmm forgot wimboot images have to be solo indexes and they use their own particular compression, so they wouldn't work in an AIO in any way...
    But I'll still work out a basic partition menu / dism application / winre copy/reagentc set
     
  16. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,754
    240
    #316 murphy78, Mar 23, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
  17. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,414
    15,608
    210
    #317 MSMG, Mar 23, 2014
    Last edited by a moderator: Apr 20, 2017
    Here is the code I do use to extract the wim image information and to store them to variables for further use.

    This code uses three functions

    GetTotalWimIndexes - Get Total Number of Indexes present in a WIM Image.

    GetWimIndexInfo - Get WIM Details (Name, Description, Architecture, Version, SP Build, WIM Edition, OS Install Type) for a particular WIM Index.

    GetWimInfo - Get WIM Details of all the Indexes present in a WIM Image.


    The First two function works properly but the third one doesn't work it just shows the index number, don't know what's going wrong.

    can anyone check it out


    Code:
    @echo off
    
    setlocal EnableExtensions
    setlocal EnableDelayedExpansion
    color 1F
    
    set InstallWim=%~dp0Install.wim
    set WimIndexNo=
    set WimIndexName=
    set WimIndexDesc=
    set WimIndexArch=
    set WimIndexVersion=
    set WimIndexVersionSPB=
    set WimIndexEdition=
    set WimIndexInstallType=
    set TotalWimIndexes=
    
    cls
    echo.
    echo.Using GetWimIndexInfo Function
    echo.
    call:GetWimIndexInfo %InstallWim%, 1
    echo.-------------------------------------------------------------------------------
    echo.1 %WimIndexArch% %WimIndexName% %WimIndexDesc% %WimIndexVersion% %WimIndexVersionSPB% %WimIndexEdition% %WimIndexInstalltype%
    echo.-------------------------------------------------------------------------------
    echo.
    echo.
    echo.Using GetWimInfo Function
    echo.
    call:GetWimInfo %InstallWim%
    echo.
    
    pause
    
    color 00
    endlocal EnableExtensions
    endlocal EnableDelayedExpansion
    exit
    ::-------------------------------------------------------------------------------------------
    
    
    ::-------------------------------------------------------------------------------------------
    :: Function to Get Total No of Indexes Present In The WIM Image
    :: Input Parameters [ %~1 : WIM Image Filename ]
    ::-------------------------------------------------------------------------------------------
    :GetTotalWimIndexes
    
    :: Finding Total No Of Indexes Present In the WIM Image
    
    FOR /F "tokens=3 delims=:, " %%i IN ('ImageX.exe /INFO %~1 ^| findstr "Count"') DO (SET TotalWimIndexes=%%i)
    
    goto:eof
    ::-------------------------------------------------------------------------------------------
    
    
    ::-------------------------------------------------------------------------------------------
    :: Function to Get WIM Image Index Information
    :: Input Parameters [%~1 : WIM Image Filename, %~2 : WIM Image Index No]
    ::-------------------------------------------------------------------------------------------
    :GetWimIndexInfo
    
    set WimInfoLog=%~dp0WimInfo.txt
    
    if exist %WimInfoLog% del /f /q %WimInfoLog% 2>nul
    
    DISM.exe /Get-WimInfo /WimFile:%~1 /Index:%~2 > %WimInfoLog%
    
    if exist "%WimInfoLog%" (
     FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Name" "%WimInfoLog%"`) DO (
      set str=%%a
      for /f "tokens=2 delims=:  " %%b in ('echo !str!') do (
       set WimIndexName=%%b
      )
     )
     
     FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Description" "%WimInfoLog%"`) DO (
      set str=%%a
      for /f "tokens=2 delims=:  " %%b in ('echo !str!') do (
       set WimIndexDesc=%%b
      )
     )
     
     FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Architecture" "%WimInfoLog%"`) DO (
      set str=%%a
      for /f "tokens=2 delims=:  " %%b in ('echo !str!') do (
       set WimIndexArch=%%b
      )
     ) 
     
     FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Version" "%WimInfoLog%"`) DO (
      set str=%%a
      for /f "tokens=2 delims=:  " %%b in ('echo !str!') do (
       set WimIndexVersion=%%b
      )
     )
     
     FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "ServicePack Build" "%WimInfoLog%"`) DO (
      set str=%%a
      for /f "tokens=2 delims=:  " %%b in ('echo !str!') do (
       set WimIndexVersionSPB=%%b
      )
     ) 
    
     FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Edition" "%WimInfoLog%"`) DO (
      set str=%%a
      for /f "tokens=2 delims=:  " %%b in ('echo !str!') do (
       set WimIndexEdition=%%b
      )
     ) 
     
     FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Installation" "%WimInfoLog%"`) DO (
      set str=%%a
      for /f "tokens=2 delims=:  " %%b in ('echo !str!') do (
       set WimIndexInstalltype=%%b
      )
     )  
    )
    
    if exist %WimInfoLog% del /f /q %WimInfoLog% 2>nul
    
    goto:eof
    ::-------------------------------------------------------------------------------------------
    
    
    ::-------------------------------------------------------------------------------------------
    :: Function to Get WIM Image Index Information
    :: Input Parameters [%~1 : WIM Image Filename]
    ::-------------------------------------------------------------------------------------------
    :GetWimInfo
    
    :: Finding Total No Of Indexes Present In the WIM Image
    
    call:GetTotalWimIndexes
    
    echo.-------------------------------------------------------------------------------
    for /L %%i in (1, 1, %TotalWimIndexes%) do (
     call:GetWimIndexInfo %InstallWim%, %%i
     echo.%%i %WimIndexArch% %WimIndexName% %WimIndexDesc% %WimIndexVersion% %WimIndexVersionSPB% %WimIndexEdition% %WimIndexInstalltype%
    )
    echo.-------------------------------------------------------------------------------
    echo.
    
    goto:eof
    ::-------------------------------------------------------------------------------------------
    
    
    
     
  18. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,019
    970
    90
    #318 Flipp3r, Mar 24, 2014
    Last edited by a moderator: Apr 20, 2017
    What if you create the diskpart file on the fly, you can then use variables.
    Code:
    echo sel dis %diskno% >diskpart.txt
    echo lis par >>diskpart.txt
    diskpart /s diskpart.txt
    So end result is selection of disk & whether it's uefi or legacy...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  19. =)(=

    =)(= Guest

    Let me guess, you will be banned very soon...
     
  20. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,754
    240
    #320 murphy78, Mar 24, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)