Aunty Mel's Cheap And Nasty SxS File Expander (Updated 2013/09/29)

Discussion in 'MDL Projects and Applications' started by SuperBubble, Sep 25, 2013.

  1. SuperBubble

    SuperBubble MDL Member

    Nov 18, 2011
    150
    295
    10
    #1 SuperBubble, Sep 25, 2013
    Last edited by a moderator: Apr 20, 2017
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,378
    2,479
    120
    #2 moderate, Sep 25, 2013
    Last edited by a moderator: Apr 20, 2017
    Nicely done, thanks...

    Now let's clear redundant manifests in DEDUP_v8-1_b9600 pack :))
    BTW: In version v1-1 the support of following syntax will be nice:

    Code:
    sxsexpand_v1-1.exe *.* C:\Decomp
    Hmmm, right manifests for dedup packages (from redundant ones)... :)))
    Code:
    amd64_microsoft-windows-d..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_cs-cz_5b4a4754601fab7d.manifest
    amd64_microsoft-windows-d..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_cs-cz_83b2cc96058f25ea.manifest
    amd64_microsoft-windows-d..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_en-us_9ea092b0471a07db.manifest
    amd64_microsoft-windows-d..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_en-us_c70917f1ec898248.manifest
    amd64_microsoft-windows-f..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_cs-cz_5778fc6c4e1c06ce.manifest
    amd64_microsoft-windows-f..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_cs-cz_e9b6849ac5087dc1.manifest
    amd64_microsoft-windows-f..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_en-us_2d0ccff6ac02da1f.manifest
    amd64_microsoft-windows-f..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_en-us_9acf47c83516632c.manifest
    amd64_microsoft-windows-v..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_cs-cz_0a172836a9e722ea.manifest
    amd64_microsoft-windows-v..oyment-languagepack_31bf3856ad364e35_6.3.9600.16384_en-us_4d6d739290e17f48.manifest
     
  3. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,378
    2,479
    120
  4. SuperBubble

    SuperBubble MDL Member

    Nov 18, 2011
    150
    295
    10
    #4 SuperBubble, Sep 25, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Wildcards not permitted. Far too much work, quite frankly. It was hard enough doing it in my package extraction script.

    If you're absolutely insistent, FORFILES is your friend, and way more powerful than wildcards. :D

    Bonus airy-fairy notion: I wonder if Windows would take exception to you decompressing the entirety of %SystemRoot%\WinSxS? :eek:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,378
    2,479
    120
    I just decompressed everything... :)) Whole ratio 43%... :)
     
  6. SuperBubble

    SuperBubble MDL Member

    Nov 18, 2011
    150
    295
    10
    I meant running Windows with it's entire SxS repository decompressed, that is, completely undoing the 'improvement' Microsoft made in Windows NT 6.3. :D

    Must... resist... urge to... start Windows PE... and... do it... :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,198
    84,773
    340
    #7 abbodi1406, Sep 25, 2013
    Last edited by a moderator: Apr 20, 2017
    :thumbsup:

    working as it promise on Windows 8.1

    For fun, i test it on "compressed" binary by KB2821895 on windows 8 and got you your first exception :D
    Code:
    Exception EInOutError in module SxSExpand.EXE at 0000A558
    I/O error 103.
     
  8. SuperBubble

    SuperBubble MDL Member

    Nov 18, 2011
    150
    295
    10
    #8 SuperBubble, Sep 26, 2013
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Ohh, definitely need to look into that. I thought I made the I/O routines absolutely bomb-proof. :eek:

    Bonus request for information: Any possibility of attaching the offending file? It would make my life much easier. :hug2:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,198
    84,773
    340
    yep :)
    but to be clear enough, i tested it on multiple files, same result
     
  10. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    Superb !! Thank you for your effort ! :p
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    #11 Mr Jinje, Sep 26, 2013
    Last edited by a moderator: Apr 20, 2017
    Good job Bubbs, now don't forget, you promised to find me that winpe-srt.cab. I bet it's on the system reserved partition in the recovery folder, via the winre.wim image #1. Here are the manifests I see for SRT on x86.

     
  12. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    What's wrong with the one in the ADK WinPE folder?
     
  13. NaiveUser

    NaiveUser MDL Senior Member

    Apr 14, 2011
    419
    523
    10
    #13 NaiveUser, Sep 26, 2013
    Last edited by a moderator: Apr 20, 2017
    it looks like it will crash if the source file is not a compressed file, can you detect that and exist gracefully ? ;)
    Code:
    Exception EInOutError in module SxSExpand.EXE at 0000A558.
    I/O error 103.
    Code:
    ntoskrnl.exe!KiCpuId+0xb6
    ntoskrnl.exe!KeWaitForMutexObject+0x138b
    ntoskrnl.exe!KeWaitForMultipleObjects+0x25d
    ntoskrnl.exe!ObWaitForMultipleObjects+0x297
    ntoskrnl.exe!MmCommitSessionMappedView+0xb6a
    ntoskrnl.exe!KeSaveStateForHibernate+0x2a33
    wow64cpu.dll!TurboDispatchJumpAddressEnd+0x536
    wow64cpu.dll!TurboDispatchJumpAddressEnd+0x9e
    wow64.dll!Wow64SystemServiceEx+0x26a
    wow64.dll!Wow64LdrpInitialize+0x435
    ntdll.dll!LdrGetKnownDllSectionHandle+0x1b5
    ntdll.dll!RtlUniform+0x182
    ntdll.dll!LdrInitializeThunk+0xe
    ntdll.dll!ZwWaitForMultipleObjects+0xc
    KERNEL32.DLL!WerpLaunchAeDebug+0x170a
    KERNEL32.DLL!WerpLaunchAeDebug+0x18b4
    KERNEL32.DLL!BasepReportFault+0x19
    ntdll.dll!RtlAllocateHeap+0xbc
    SxSExpand.EXE+0x3f34
    ntdll.dll!RtlRaiseStatus+0x86
    ntdll.dll!KiUserExceptionDispatcher+0xf
    SxSExpand.EXE+0xa558
    KERNEL32.DLL!BaseThreadInitThunk+0xe
    ntdll.dll!RtlInitializeExceptionChain+0x85
    ntdll.dll!RtlInitializeExceptionChain+0x58
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. Mr Jinje

    Mr Jinje MDL Expert

    Aug 19, 2009
    1,770
    1,101
    60
    That fooled me at first, then someone reminded me those are just the language packs, (en-us, en-gb, etc) and that the actual winpe-srt.cab is not available in the "WinPE_OCs" parent folder with all the other .cabs.
     
  15. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    Oh I get it. The winpe versions are just the language plugins for the actual package.
     
  16. SuperBubble

    SuperBubble MDL Member

    Nov 18, 2011
    150
    295
    10
    Yep, thanks for that. As NaiveUser pointed out, it crashes on anything that isn't actually a SxS BDC file. I've fixed up the offending code - you can tell I'm sleep deprived: half the I/O functions were outside the exception handler - and now it will exit gracefully, and will even try to decompress files that lack the SxS BDC header, but appear to be BDC files.

    Which brings me, in a roundabout way, to a revelation: that winload.exe you sent me is not a SxS BDC file. It's not even a 'delta-less' BDC file. Even if it didn't crash, my tool wouldn't have been able to decompress it for you. It's only 60KB, yet the header says it will produce a >1MB file. It's clearly expecting a source file to 'delta' off of. Sorry. :(

    I promised you no such thing, sir. :D

    However, I will (when I wake up) be generating my own WinPE-SRT packages for WinPE 5.0, and I'll be more than happy to offer them to anyone willing to take them. :)

    Yep, you only get a real WinPE-SRT package if you back a truckfull of money up to Steve Ballmer, and licence the OEM Preinstallation Kit - which the AIK/ADK is a cut-down version of. :mad:

    But anyway, OP update shortly with new, less-buggy version. :eek:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,198
    84,773
    340
    Successfully extracted WinPE-SRT feature pack from winre.wim :D

    all hail for the precious tool :good3:

    note about microsoft-windows-w..oc-srt-registrykeys_31bf3856ad364e35_6.3.9600.16384_none_0c13da62af650cca.manifest
    although its name and description is related to SRT package, but it's not connected or a part of it directly
    i saw no refference for it in any of the manifests, and i add it to the .cab, but when testing integration it's not gets integrated with SRT pack.
     
  18. Luckie

    Luckie MDL Junior Member

    Jan 14, 2008
    83
    17
    0
    how to use it? I always get "Can't open input file"
     
  19. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,198
    84,773
    340
    #20 abbodi1406, Sep 26, 2013
    Last edited by a moderator: Apr 20, 2017
    Code:
    SxSExpand input-file output-file
    output-file can be a folder path
    input-file must be on the same partition as SxSExpand