Windows Integration Guide - murphy78

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

  1. Shayne

    Shayne MDL Addicted

    Jul 31, 2009
    752
    181
    30
  2. franco54

    franco54 MDL Novice

    Nov 7, 2012
    12
    8
    0
    I think the date comes from the LASTMODIFICATIONTIME part inside the [1].xml inside the wim file.

    You can convert those hex strings into a readable format using the w32tm command. Example:

    Code:
    < ?xml version="1.0" encoding="UTF-8"?>
    < WIM>
    <TOTALBYTES>179531723</TOTALBYTES>
    <IMAGE INDEX="1">
    <DIRCOUNT>1104</DIRCOUNT>
    <FILECOUNT>6119</FILECOUNT>
    <TOTALBYTES>775969194</TOTALBYTES>
    <HARDLINKBYTES>276799079</HARDLINKBYTES>
    <CREATIONTIME>
    <HIGHPART>0x01CFAD30</HIGHPART>
    <LOWPART>0x24D37539</LOWPART>
    </CREATIONTIME>
    <LASTMODIFICATIONTIME>
    <HIGHPART>0x01CFB02C</HIGHPART>
    <LOWPART>0xAAF245D3</LOWPART>
    </LASTMODIFICATIONTIME>
    <WINDOWS>
    <ARCH>0</ARCH>
    <PRODUCTNAME>Microsoft® Windows® Operating System</PRODUCTNAME>
    <PRODUCTTYPE>WinNT</PRODUCTTYPE>
    <PRODUCTSUITE />
    <LANGUAGES>
    <LANGUAGE>en-US</LANGUAGE>
    <DEFAULT>en-US</DEFAULT>
    </LANGUAGES>
    <VERSION>
    <MAJOR>6</MAJOR>
    <MINOR>3</MINOR>
    <BUILD>9600</BUILD>
    <SPBUILD>16384</SPBUILD>
    <SPLEVEL>0</SPLEVEL>
    </VERSION>
    <SYSTEMROOT>WINDOWS</SYSTEMROOT>
    </WINDOWS>
    <NAME>MODERNCORE_INSTALL</NAME>
    <WIMBOOT>0</WIMBOOT>
    </IMAGE>
    [...]
    < /WIM>

    (example WIM from IoT preview 2)


    Highpart: 0x01CFB02C
    Lowpart: 0xAAF245D3

    fonte: betaArchive
     
  3. l33tissw00t

    l33tissw00t MDL Addicted

    Dec 6, 2012
    819
    520
    30
    #825 l33tissw00t, Dec 29, 2015
    Last edited by a moderator: Apr 20, 2017
    hey murph,
    thanks for all the info

    you mentioned in OP that for 64bit iso you like to add efi info:

    im confused as to when i have to use this command.

    example:
    i take windows 7 64bit iso from msdn. extract it. integrate updates into install.wim. now what? you mention something about using w8 efisys.bin file. whats wrong with the one thats already in the w7x64 iso?

    also, can you please provide a subsitute of this:
    Code:
    oscdimg -bc:\win8x64\efi\microsoft\boot\efisys.bin -pEF -u1 -bootdata:2#p0,e,bc:\win8x64\boot\etfsboot.com#pEF,e,bc:\win8x64\efi\microsoft\boot\efisys.bin -lWin8DVD c:\win8x64\ C:\temp\OutputDVDName.iso

    for windows 7 x64?
    (if it varies based on the .bin im using)
    thank you!
     
  4. oldee

    oldee MDL Member

    May 27, 2012
    171
    47
    10
    #826 oldee, Jan 2, 2016
    Last edited: Jan 4, 2016
    @murphy78, Happy New Year!
    Thank you.
     
  5. l33tissw00t

    l33tissw00t MDL Addicted

    Dec 6, 2012
    819
    520
    30
  6. spidernz

    spidernz MDL Senior Member

    May 20, 2011
    389
    112
    10
    Here's what i use.



    "%DISMX64%\Dism.exe" /Get-wimInfo /wimFile:%PATH%\iso\sources\install.wim
    "%ISOMAKER%\oscdimg.exe" -h -m -o -u2 -udfver102 -bootdata:2#p0,e,b%PATH%\iso\boot\etfsboot.com#pEF,e,b%PATH%\iso\efi\microsoft\boot\efisys.bin -l"%DISC%" %PATH%\iso "%WD%:\%DISC%.iso"

    Obvious for their reasons:

    -o = Uses a MD5 hashing algorithm to compare files. <----- not really required unless you're uploading or transferring the file and need to make sure it did so correctly
    -h = Includes hidden files and directories in the source path of the image. <----- just in case there are (i'm not sure if the system folders count as they're hidden by default on a live system?)
    -m = Ignores the maximum size limit of an image. <-----since i use usb drives to install

    with -u1 vs -u2 i'm not sure i figured I'm not burning cd's so don't really need iso 9660 filesystem.

    -x = Computes and encodes the AutoCRC value in the image. (only found this on vista adk) <-----MS uses this so i guess murphy just decided too as well
     
  7. greenworld5588

    greenworld5588 MDL Novice

    Jun 4, 2014
    19
    0
    0
    What it is possible to integrate Windows 7 and 8.1 install.wims to a single install.wim?
     
  8. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,213
    94,561
    450
    You can export all wim indexes to one, from Vista and up, remember the install.wim/esd/swm will grow a lot in size.
     
  9. l33tissw00t

    l33tissw00t MDL Addicted

    Dec 6, 2012
    819
    520
    30
  10. Magmarock

    Magmarock MDL Member

    Oct 12, 2016
    175
    22
    10
    Hey Murphy what do you think of Linux OS?
     
  11. Bira

    Bira MDL Member

    Oct 4, 2017
    197
    108
    10
    #833 Bira, Jun 25, 2018
    Last edited by a moderator: Jun 25, 2018
  12. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    #834 s1ave77, Jun 28, 2018
    Last edited: Jun 28, 2018
    By moving the mkdir part inside the loop and using the runtime variable %%x of the loop to assign a sub-folder per index, like:
    Code:
    @echo off
    if not exist c:\win81x64 exit
    
    for /l %%x in (1, 1, 7) do (
    if not exist d:\mount\%%x mkdir d:\mount\%%x
    dism /mount-wim /wimfile:c:\win81x64\sources\install.wim /index:%%x /mountdir:D:\mount\%%x
    )
    
    To make the script auto-detect the contained indizes:
    Code:
    @echo off
    setlocal EnableDelayedExpansion
    if not exist c:\win81x64 exit
    
    for /f "tokens=2 delims=: " %%a in ('dism /english /Get-WimInfo /WimFile:"c:\win81x64\sources\install.wim" ^| findstr /i Index') do (
    rem remove any quotes in index nr. in newer dism versions
    set ix=%%a
    set ix=!ix:"=!
    if not exist d:\mount\!ix! mkdir d:\mount\!ix!
    dism /mount-wim /wimfile:c:\win81x64\sources\install.wim /index:!ix! /mountdir:D:\mount\!ix!
    )
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. Bira

    Bira MDL Member

    Oct 4, 2017
    197
    108
    10
    Hello s1ave77, I did the first one and everything worked out, set up the folders according to the index, correct, the second scripts I did not understand, but I'm doing another one, only this is breaking my head, I'm still an apprentice, the scripting programs, I like automation, want to ask, how do I do a loop like this - for / L %% i in (1, 1,% VERSIONS%) of (, with index: %% i, , example: set "INSTALLMOUNTDIR =% MOUNTDIR% \ install", inside that install ?, and also, make recognize in the directory of the folder where this Packs / updates / x32 / x64, doing with the set, in the same way as the example above no need to make a folder with mkdir? do not wait for your feedback, and thanks for your help!
     
  14. Bira

    Bira MDL Member

    Oct 4, 2017
    197
    108
    10
    #836 Bira, Jul 1, 2018
    Last edited: Jul 1, 2018
    I want to make a script where it gives me information of all images, with Count, IndexNo, Architecture, Name, Description, Flag, Edition, InstallationType, DefaultLanguage, Build, Version, ServicePackBuild, ServicePackLevel, Size and PackageServicePackBuild, recognizing windows 7-8.1 -10, as well as in msmg, but without pointing out, but the scripts already go straight, and recognize the folder inside packs, update and drivers, and mount all the images with a newer dism.exe with the adk inslated in machine physically, or a dism folder within the directory, within each image index its folder before, then install updates or put drivers, save and unmount, and export, all within an install.wim with maximum compression and move, create the .iso, recognizing Windows 7-8.1-10, then deleting all folders, understood?
     
  15. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    @Bira ambitious and also complex task since it needs some know-how regarding the for /f loops to parse the informations needed directly from the used WIM.

    Note: the /english switch forces english output to make the parsing more consistent.
    Code:
    dism /english /Get-WimInfo /WimFile:"c:\win81x64\sources\install.wim"
    
    gives an overview to check the available indices in a wim.
    Code:
    G:\win>dism /english /Get-WimInfo /WimFile:"install.wim"
    
    Deployment Image Servicing and Management tool
    Version: 10.0.14393.0
    
    Details for image : install.wim
    
    Index : 1
    Name : Windows 10 Home
    Description : Windows 10 Home
    Size : 16.013.005.171 bytes
    
    Index : 2
    Name : Windows 10 Pro
    Description : Windows 10 Pro
    Size : 16.117.026.519 bytes
    
    Index : 3
    Name : Windows 10 Pro for Workstations
    Description : Windows 10 Pro for Workstations
    Size : 16.094.029.596 bytes
    
    Index : 4
    Name : Windows 10 Enterprise
    Description : Windows 10 Enterprise
    Size : 16.094.030.666 bytes
    
    The operation completed successfully.
    
    Code:
    dism /english /Get-WimInfo /WimFile:"c:\win81x64\sources\install.wim" /Index:1
    
    gives verbose output for each chosen index with all the info you're searching for.
    Code:
    G:\win>dism /english /Get-WimInfo /WimFile:"install.wim" /Index:1
    
    Deployment Image Servicing and Management tool
    Version: 10.0.14393.0
    
    Details for image : install.wim
    
    Index : 1
    Name : Windows 10 Home
    Description : Windows 10 Home
    Size : 16.013.005.171 bytes
    WIM Bootable : No
    Architecture : x64
    Hal : <undefined>
    Version : 10.0.17063
    ServicePack Build : 1000
    ServicePack Level : 0
    Edition : Core
    Installation : Client
    ProductType : WinNT
    ProductSuite : Terminal Server
    System Root : WINDOWS
    Directories : 21490
    Files : 103775
    Created : 15.12.2017 - 02:52:51
    Modified : 20.12.2017 - 17:38:43
    Languages :
            de-DE (Default)
    
    The operation completed successfully.
    
    The second script isn't that complicated. The for loop checks the Wim-Info for the line 'Index : "1"' (in older versions of dism it's shown without the "), assigns the runtime variable %%a to variable %ix% and cleans any quotes in the second set line. Since the variable is set inside the loop, it needs to use !ix! instead of %ix%. Rest is similiar to the 1st script.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. Bira

    Bira MDL Member

    Oct 4, 2017
    197
    108
    10
    Look at this slave I already have in the scripts

    cd / d "% ~ dp0"
    set "WORKDIR =% cd%"
    set "TEMPDIR =% WORKDIR% \ TEMP"
    if "% INSTALLWIMDIR%" == "" set "INSTALLWIMDIR = install.wim"
    if "% MOUNTDIR%" == "" set "MOUNTDIR =% ~ dp0 \ MOUNT"
    set "DISMTEMPDIR =% TEMPDIR% \ scratch"
    set "EXTRACTDIR =% TEMPDIR% \ extract"
    set "INSTALLMOUNTDIR =% MOUNTDIR% \ install"

    =====================
    Information Image (s)
    =====================

    Deployment Image Management and Maintenance Tool
    Version: 10.0.17134.1

    Image Details: install.wim

    Table of contents: 1
    Name: Windows 7 Home Basic x64
    Description: Home Basic
    Size: 11,776,358,966 bytes

    Table of Contents: 2
    Name: Windows 7 Home Premium x64
    Description: Home Premium
    Size: 12,290,816,824 bytes

    Table of Contents: 3
    Name: Windows 7 Professional x64
    Description: Professional
    Size: 13,448,801,793 bytes

    Table of Contents: 4
    Name: Windows 7 Enterprise x64
    Description: Enterprise
    Size: 13.475.655.960 bytes

    Table of contents: 5
    Name: Windows 7 Ultimate x64
    Description: Ultimate
    Size: 13,626,231,207 bytes

    The operation completed successfully.


    =================================
    Detect details Image (s)
    =================================


    Version: 7601
    Quant: 5 Image (s)
    Architecture: 64-bit


    ===============================
    Mounting Image (s) - index 1/5
    ===============================
    Press any key to continue. . .
     
  17. Bira

    Bira MDL Member

    Oct 4, 2017
    197
    108
    10
    what I want, and that in this folder install, where I installed the loop, install the 1/5 images each one in your folder, and also I can create there the folders of the directory, where it will recognize in the directory, a folder, Packs / updates / x32 / 64, inside the same folder Packs / drivers / x32 / 64 to install in scripts, without mounting one with mkdir, understood?
     
  18. Bira

    Bira MDL Member

    Oct 4, 2017
    197
    108
    10
    #840 Bira, Jul 1, 2018
    Last edited: Jul 1, 2018
    for those who do not know anything about scripts, I got other scripts and went to see if it worked. When I saw that it was working, I attributed it to my own way, of course, with a lot of head-ache, and gave it to me where I wanted to, that the scripts only recognized, the number of install.wim, with% VERSIONS% pulls the other ne? but let's one day learn rs I did nothing rs only I was erasing to see where it was where one was pulling the other finally gave it rs, what I just want and automatically make these index folders as in the first explanation that you gave in the loop d: \ mont\%% x, but in that install in that folder, and create the directory packs / updates / x32 / 64, and packs / drivers / x32 / 64, in that scripts