[Q:] Is it possible to extract already integrated package from WIM

Discussion in 'Windows 8' started by moderate, Nov 27, 2014.

  1. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,381
    2,479
    120
    Hello,

    is it reversible command for:

    Dism /Image:C:\Mount /Add-Package ...

    which will extract the added package back from WIM (either like plain files or even CAB)?
     
  2. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,381
    2,479
    120
  3. LiteOS

    LiteOS Windowizer

    Mar 7, 2014
    2,207
    981
    90
    u might can use the temp folder its created to add it to other wim
     
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,219
    84,895
    340
    I'm afraid i don't have the luxury of downloading + 3GB nowadays, it would take me 3 days :stretcher:

    i could write you the steps :D
     
  5. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,381
    2,479
    120
    OK, please write me the steps :))
     
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,219
    84,895
    340
    #9 abbodi1406, Nov 28, 2014
    Last edited by a moderator: Apr 20, 2017
  7. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,381
    2,479
    120
    #10 moderate, Nov 28, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    Yes, CAT/MUM is there. 7-Zip displays nothing but DISM do:

    WIM.jpg
    WIM_7-Zip.jpg

    A reboot is needed 1st:
    Code:
    Now setting privilege: SeDebugPrivilege
    Now setting privilege: SeAssignPrimaryTokenPrivilege
    AdjustTokenPrivileges (SeAssignPrimaryTokenPrivilege): Caller hasn't assigned all linked rights or groups.
    LsaAddAccountRights 0x00000000
    Reboot required for changes to take effect
    Now setting privilege: SeIncreaseQuotaPrivilege
    Running in session: 1
    Host PID: 976
    Q1: Where is this setting "SeAssignPrimaryTokenPrivilege" stored?

    It works hard like Etiopian child, chars are flying up and falling down from the screen, but there is no CzechLangPack.cab in the end. So,

    Q2: Into which TEMP folder it extracts?
    Q3: And where does it put the result?


    I thought it should be in working directory but there is no file there...
     
  8. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,381
    2,479
    120
    #11 moderate, Nov 28, 2014
    Last edited: Nov 28, 2014
    (OP)
    I am adding pause to SxSExtractor.cmd to see how it ends...

    Hmmm...

    ERROR:
    C:\Work\SxSExtract.vbs(56, 2) Microsoft VBScript - error by running program: Insufficient space in buffer: 'LogBare'


    So it is Buffer overflow error...
     
  9. qad

    qad MDL Member

    Dec 17, 2012
    218
    829
    10
    #12 qad, Nov 28, 2014
    Last edited by a moderator: Apr 20, 2017
  10. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,219
    84,895
    340
    #14 abbodi1406, Nov 28, 2014
    Last edited by a moderator: Apr 20, 2017
    Ignore that, no reboot is required and the SxSExtractor.cmd will get the system/trustedinstaller privileges
     
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,219
    84,895
    340
    #15 abbodi1406, Nov 28, 2014
    Last edited by a moderator: Apr 20, 2017
    You may try to redirect the log/screen output to a file, adding this to the command end
    Code:
    CzechLangPack.cab >log.txt
     
  12. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,381
    2,479
    120
    #16 moderate, Nov 28, 2014
    Last edited by a moderator: Apr 20, 2017
    (OP)
    For reason unknown, when it is pipelined this way (window 4 on the pic), the error doesn't display in log.txt, but still there is no CAB in output/working dir.
    When paused (window 2 on the pic) the error displays on same place, where log.txt ends.

    My conclusion is, that language pack is too big for BubbleBobble's script. But method itself is great and thank you for it.

    Output.jpg

    BTW: Is Office 2013 Langpack stored in C:\MSOCache directory? For Windows RT v8-1 it is downloaded (together with Windows LP.CAB) as 50MB big ARM EXE, which creates this directory after it is runned.
     
  13. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,219
    84,895
    340
    could you try the command without /INCLUDERES /VICIOUSHACKS ?

    i don't know, never used another langpack for office
    however, this directory is somehow unusable (i.e. to create a backup install source)
     
  14. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,381
    2,479
    120
    #18 moderate, Nov 28, 2014
    Last edited: Nov 28, 2014
    (OP)
    /yes /without /vicious /and /hideous /it /works.
    :)

    Size of Windows RT v8-1 (MS-WU-Native) LP is 18 255 212 B.
    Size of Windows RT v8-0 (ABSbody's) LP is 18 487 317 B.
     
  15. moderate

    moderate MDL Guru

    Aug 31, 2009
    3,381
    2,479
    120
    #19 moderate, Nov 28, 2014
    Last edited: Nov 28, 2014
    (OP)
    With /INCLUDERES only and without /VICIOUSHACKS:

    C:\Work\SxSExtract.vbs(52, 2) Microsoft VBScript - error by running program: Out of Memory: 'WScript.Echo'

    With /VICIOUSHACKS only and without /INCLUDERES:

    It works and CAB is the same as "without /VICIOUSHACKS" together with "without /INCLUDERES" :))

    So it doesn't like /INCLUDERES, what is quite funny, because nearly all items are RES. :)))
     
  16. SuperBubble

    SuperBubble MDL Member

    Nov 18, 2011
    150
    295
    10
    My suspicion is that it's a genuine Out Of Memory error running the script.

    That thing is some of the craziest code I've ever written (I'm still waiting for my own entry on The Daily WTF :D): it uses a neat-o, object-oriented (read: memory-intensive) VBScript language features to build the file list; it's very recursive code (read: stack memory-intensive); and it gets about ten times worse when switches are specified (because the file list grows huge, plus I wrote my own filename matcher...).

    This all comes together in a perfect storm when dealing with LPs, which tend to be several thousand files at least. KABOOM!

    Remind me to shake KNARZ and abbodi a bit: from the way they were talking when this escape^H^H^H^H^H^Hwas released, I was sure they would have come up with a native-code version of my script by now. :worthy:

    Oh, and myth-conception-bonking time: /INCLUDERES isn't quite what you think - it's to vacuum up localised resources when the parent package doesn't directly reference them. If the package does reference them directly (like in a LP, for instance :D), it shouldn't be needed at all.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...