MERGE-WIM [FIXED]

Discussion in 'Scripting' started by phynz, Apr 1, 2025.

  1. phynz

    phynz MDL Novice

    Mar 19, 2025
    49
    13
    0
    #1 phynz, Apr 1, 2025
    Last edited: Apr 3, 2025
    :evil2:MERGE WIM:evil2:
    This script is designed to make merging two .wim files quick and easy. It provides an interactive interface with dialog boxes to select files, choose compression types, and specify the output location. :argue:
    :schmorch:FEATURES:schmorch:

    ◼Choose any index: Select any index from the .wim files:Egypt:

    ◼Detailed info: Displays the name, index number, and description of each file:vertag:

    ◼Compression options: Choose from None, XPRESS, LZX, or LZMS:wiggle:
    ◼New design: :band::boxing::cheers:
    ◼Compatibility: Combine .wim files from Windows 10 and Windows 11 [idk, test it, lol] :sorry:

    :headbang:HOW TO USE:headbang:
    ◼Run as administrator: Start the script with admin privileges.:weeping::whip:

    ◼Select the first file: Choose the first .wim file.:dance:

    ◼Select the second File: Pick the second .wim file.:bruce_h4h:

    ◼Specify output location: Select where to save the merged file.:sun:

    ◼Choose compression: Select your preferred compression type::kicking:

    1. None
    2. XPRESS
    3. LZX
    4. LZMS
    ◼Relax: Let the script do its magic! :sith:

    :bananajoj2:LINKS:bananajoj2:

    https://github.com/ophynz/MERGE-WIM/releases/tag/INDEX :tasty:

    :bananajoj2:PHOTOS:bananajoj2:
    https://in-myclub.blogspot.com/2025/04/merge-wim.html :caffeine:









     
  2. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,632
    1,650
    150
    This is faulty as it only exports Index 1
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. phynz

    phynz MDL Novice

    Mar 19, 2025
    49
    13
    0
    upload_2025-4-1_9-19-55.png
    ??
     
  4. Tito

    Tito Admin / Adviser
    Staff Member

    Nov 30, 2009
    18,942
    19,419
    340
    @phynz

    This is a snippet from your script:
    Code:
    Write-Host "Exporting images..." -ForegroundColor Red
    dism /Export-Image /SourceImageFile:$sourceFile1 /SourceIndex:1 /DestinationImageFile:$destinationFile /Compress:max /CheckIntegrity
    
    Write-Host "Adding images..." -ForegroundColor Red
    dism /Export-Image /SourceImageFile:$sourceFile2 /SourceIndex:1 /DestinationImageFile:$destinationFile /Compress:max /CheckIntegrity
    
    Which means you are always exporting the first index of the chosen WIM files, ignoring the fact that the source(s) can be multi-index as well. This is what @tcntad pointed out.
     
  5. tcntad

    tcntad MDL Guru

    Oct 26, 2009
    4,632
    1,650
    150
    yes, I shouldve been more clear.
    The /SourceIndex will always be number 1, make it list available indexes and ask for input
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. phynz

    phynz MDL Novice

    Mar 19, 2025
    49
    13
    0
    ohh thanks, I'll fix it later
     
  7. phynz

    phynz MDL Novice

    Mar 19, 2025
    49
    13
    0
    done
     
  8. phynz

    phynz MDL Novice

    Mar 19, 2025
    49
    13
    0
    @Tito
    @tcntad
    u can now try the new script, I fixed everything and it works now :evil2::evil2::evil2::evil2::evil2: