abbodi1406's Batch Scripts Repo

Discussion in 'Scripting' started by abbodi1406, May 4, 2017.

    He uses W10MUI, you use multi_arch_iso I think.
     
  1. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,668
    103,485
    450
    #802 Enthousiast, Jul 17, 2019
    Last edited: Jul 17, 2019
    Same.

    Incorrect:
    Code:
    
    ============================================================
    Enter the distribution path (without quotes marks ""):
    ISO file, Extracted ISO folder, DVD/USB drive letter
    ============================================================
    
    g:\18362.239\
    
    ============================================================
    Prepare work directories
    ============================================================
    
    
    ============================================================
    Detect language packs details
    ============================================================
    
    de-DE: 64-bit {x64} - 18362
    
    ============================================================
    Copy Distribution contents to work directory
    ============================================================
    
    Source Path:
    "g:\18362.239\"
    
    ============================================================
    ERROR: Could not find install.wim file in \sources folder
    ============================================================
    
    Press any Key to Exit.
    
    
    
    Correct:
    Code:
    
    ============================================================
    Enter the distribution path (without quotes marks ""):
    ISO file, Extracted ISO folder, DVD/USB drive letter
    ============================================================
    
    g:\18362.239\en_windows_10_business_editions_version_1903_updated_july_2019_x64_dvd_97049592.iso
    
    ============================================================
    Prepare work directories
    ============================================================
    
    
    ============================================================
    Detect language packs details
    ============================================================
    
    de-DE: 64-bit {x64} - 18362
    
    ============================================================
    Copy Distribution contents to work directory
    ============================================================
    
    Source Path:
    "g:\18362.239\en_windows_10_business_editions_version_1903_updated_july_2019_x64_dvd_97049592.iso"
    
    ============================================================
    Detect install.wim details
    ============================================================
    
    Build: 18362
    Count: 10 Image(s)
    Arch : 64-bit
    
    ============================================================
    Set WinPE language packs paths
    ============================================================
    
    de-DE / 64-bit
    
    ============================================================
    Extract language packs
    ============================================================
    
    de-DE / 64-bit
    
    ============================================================
    Mount install.wim - index 1/10
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    
    
    
    Little addition:

    When the iso is placed next to the script, it sometimes asks for the iso filepath too (when it can't find a wim or an extracted iso folder present and the iso filename is to long), then it's sufficient to only insert the iso filename, including the .iso extension.
     
  2. vze2mp9g

    vze2mp9g MDL Addicted

    Oct 13, 2012
    660
    117
    30
    @abbodi1406

    Yes.. Do I also have to put the file name in as well?

    C:\Users\dcms6\Downloads\ISO\18362.10000.190627-1906.19H1_RELEASE_SVC_19H2_REL_CLIENTMULTI_X64FRE_EN-US.ISO

    or could I just put:

    C:\Users\dcms6\Downloads\ISO\

    Lastly, Can you do two ISOs one X86 & X84?

    Thank you for replying.
     
  3. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,668
    103,485
    450
    I've showed you two examples which should have answered your question, @abbodi1406 also answered it.
     
  4. vze2mp9g

    vze2mp9g MDL Addicted

    Oct 13, 2012
    660
    117
    30
    Thanks. Just got don reading it...
     
  5. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    Yes, W10MUI support multi-architecture images
     
  6. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,008
    957
    90
    I've been using W10UI to integrate updates which is fantastic. I'm deploying the updated esd's from WinPE built by ADK.
    Is there a batch file I can use to update my WinPE wims?
    Is it just enough to use:
    Code:
    Dism /Image:Mount /Add-Package /PackagePath:C:\WHDownloader\Updates\Windows10-x64\General\18362\
    or do I need to be more specific?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    You can point W10UI to WinPE wim file as target

    SSU must be first, alone
     
  8. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,008
    957
    90
    Thanks it worked. I see the registry doesn't reflect the updates but if I just type "ver" it's correct...
    Code:
    FOR /F "usebackq tokens=2,* skip=2" %%L IN (`reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinPE" /v Version`) DO SET WinPE_Ver=%%M
    Reg = 10.0.18362.1
    Ver= 10.0.18362.239
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    Were they updating that registry before?
    this is similar to ver command
    Code:
    for /f "tokens=3" %%a in ('reg query "hklm\software\microsoft\Windows NT\currentversion" /v UBR') do set /a "UBR=%%a"
    for /f "tokens=3" %%a in ('reg query "hklm\software\microsoft\Windows NT\currentversion" /v CurrentBuild') do set "WinPE_Ver=10.0.%%a.%UBR%"
     
  10. Flipp3r

    Flipp3r MDL Guru

    Feb 11, 2009
    2,008
    957
    90
    I'm not sure. I've always used that code to get the WinPE version but this is the first time that I've actually updated WinPE.
    Nice code. I like it better than mine which used the ver command!
    Code:
    @echo off
    setlocal enableextensions
    for /f "tokens=4-5 delims= " %%i in ('ver') do (
      if "%%j"=="" (set v=%%i) else (set v=%%j)
    )
    for /f "tokens=1-4 delims=.]" %%i in ("%v%") do (
      set OS_VER_MAJOR=%%i
      set OS_VER_MINOR=%%j
      set OS_BUILD_NUM=%%k
      set OS_BUILD_SUB=%%l
    )
    echo Detected OS version: %OS_VER_MAJOR%.%OS_VER_MINOR%.%OS_BUILD_NUM%.%OS_BUILD_SUB%
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
  12. @GezoeSloog: A good (or not good) idea for your "Create Additional editions" script:

    You could make an option to create consumer iso with retail hwid keys and you could make an option to create business iso with gvlk keys. Just get the keys from the pkeyconfig.rar posted by @Enthousiast (i think this is nothing new for you)
     
  13. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,668
    103,485
    450
    ??????
     
  14. Creating the same indexes with the same preinstalled keys like the MSDN and MVS consumer and business ISO’s.
     
  15. Ras0

    Ras0 MDL Novice

    May 7, 2012
    33
    15
    0
    Something changed with 1607 again I guess. Output name as Win10_14393.0_x64_2019-07-26.
    Code:
    ============================================================
    Running W10UI v6.6
    ============================================================
    
    ============================================================
    Extracting .cab files from .msu files
    ============================================================
    
    1/4: Windows10.0-KB4054590-x64.msu
    2/4: windows10.0-kb4503308-x64_002bdb3ec1738d89a7b41dd565780994e501bf46.msu
    3/4: Windows10.0-KB4507459-x64.msu
    4/4: Windows10.0-KB4509091-x64.msu
    
    ============================================================
    Extracting files from update cabinets (.cab)
    *** This will require some disk space, please be patient ***
    ============================================================
    
    1/4: Windows10.0-KB4054590-x64.cab
    2/4: Windows10.0-KB4503308-x64.cab
    3/4: Windows10.0-KB4509091-x64.cab
    
    ============================================================
    Mounting install.wim - index 1/1
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Checking Updates...
    ============================================================
    
    ============================================================
    Installing servicing stack update...
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.0
    
    Processing 1 of 1 - Adding package Package_for_KB4509091~31bf3856ad364e35~amd64~~14393.3081.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Installing updates...
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.3081
    
    Processing 1 of 2 - Adding package Package_for_KB4054590~31bf3856ad364e35~amd64~~10.0.1.2072
    [==========================100.0%==========================]
    Processing 2 of 2 - Adding package Package_for_KB4503308~31bf3856ad364e35~amd64~~10.0.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Resetting OS image base
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.3081
    
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Updating winre.wim
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.0
    
    Processing 1 of 1 - Adding package Package_for_KB4509091~31bf3856ad364e35~amd64~~14393.3081.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.3081
    
    [===========================98.4%========================= ]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image File : D:\winre.wim
    Image Index : 1
    Saving image
    [==========================100.0%==========================]
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Exporting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Adding updated winre.wim
    ============================================================
    
            1 file(s) copied.
    
    ============================================================
    Unmounting install.wim - index 1/1
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image File : E:\Pro1607Base-2\sources\install.wim
    Image Index : 1
    Saving image
    [==========================100.0%==========================]
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Rebuilding install.wim
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Exporting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Mounting boot.wim - index 1/2
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Checking Updates...
    ============================================================
    
    ============================================================
    Installing servicing stack update...
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.0
    
    Processing 1 of 1 - Adding package Package_for_KB4509091~31bf3856ad364e35~amd64~~14393.3081.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Resetting WinPE image base
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.3081
    
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Unmounting boot.wim - index 1/2
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image File : E:\Pro1607Base-2\sources\boot.wim
    Image Index : 1
    Saving image
    [==========================100.0%==========================]
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Mounting boot.wim - index 2/2
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Checking Updates...
    ============================================================
    
    ============================================================
    Installing servicing stack update...
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.0
    
    Processing 1 of 1 - Adding package Package_for_KB4509091~31bf3856ad364e35~amd64~~14393.3081.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Resetting WinPE image base
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image Version: 10.0.14393.3081
    
    [===========================98.2%========================  ]
    The operation completed successfully.
    
    ============================================================
    Unmounting boot.wim - index 2/2
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Image File : E:\Pro1607Base-2\sources\boot.wim
    Image Index : 2
    Saving image
    [==========================100.0%==========================]
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Rebuilding boot.wim
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Exporting image
    [==========================100.0%==========================]
    Exporting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Removing temporary extracted files...
    ============================================================
    
    
    ============================================================
    Creating updated ISO file...
    ============================================================
    
    OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility
    Copyright (C) Microsoft, 1993-2012. All rights reserved.
    Licensed only for producing Microsoft authorized content.
    
    
    Scanning source tree
    Scanning source tree complete (221 files in 21 directories)
    
    Computing directory information complete
    
    Image file is 3571023872 bytes (before optimization)
    
    Writing 221 files in 21 directories to D:\Win10_14393.0_x64_2019-07-26.iso
    
    100% complete
    
    Storage optimization saved 21 files, 14014464 bytes (1% of image)
    
    After optimization, image file is 3557519360 bytes
    Space saved because of embedding, sparseness or optimization = 14014464
    
    Done.
    
    ============================================================
       Finished
    ============================================================
    
    
    Press 9 to exit.
    
     
  16. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,668
    103,485
    450
    Gezoesloog doesn't create iso's, he provides svf files for original mvs iso's.

    And there is no need for different iso's with oemret or vl keys inside, just export the enterprise sku to the consumer wim and you have a full aio, keys don't matter, kms tools insert them by default when needed.
     
  17. I mean he could add a feature for *Create Additional versions* which could make the same indexes as the Consumer and Business iso files on MSDN and MVS.
     
  18. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,668
    103,485
    450
    You can set it to whatever you want or just to ALL, and it will create whatever you set it to create.
     
  19. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    @wavemaster76
    you can select whatever editions you would like to have
    Pro and Home are set to retail, which are the most likely editions to have HWID
    Education and Enterprise are set to gVLK

    @Ras0
    KB4507459 is not being extracted, the msu file is maybe corrupted