murphy78 DiskPart and Apply Image Script

Discussion in 'Scripting' started by murphy78, Apr 2, 2014.

  1. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,756
    240
    Such is life with any file hosting site. At the time I couldn't remember the mirror creator site I used and usercloud seemed reliable to me. I expect MDL users to be smart enough not to click on random exe files, especially when I state that I am not giving exe files.
     
  2. Your Script is Awesome . Thanks a lot lot for putting hard efforts to release latest 1.3.0 update.

    Regards,
    [COIN]
     
  3. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,128
    105,643
    450
    @murphy78, remember i once asked for a little modification to support MCT like ISOs (with the separate x86 and x64 folders) for the $OEM$ copy option?

    Any chance this could be implemented?
     
  4. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,756
    240
    You mean like \x64\sources\$oem$ and \x86\sources\$oem$
    like I do for the install.wim?
     
  5. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,128
    105,643
    450
    Yep:)
     
  6. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,128
    105,643
    450
    Can you please stop parroting me?
     
  7. no i am not . i just shared my view on his comment . might be it is tagged with you.
     
  8. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,756
    240
    Okay, let's say hypothetically I did an auto-copy of these folders. Would I then need to tie them to the index being applied? Because this could get complicated quickly if I'm supposed to differentiate between the x64 version on a x64 applied image. Generally an $oem$ folder will copy over and whatever exists in the the folder will have to sort itself out post-install. But if we have both an x64 and an x86 version with their own $oem$ folders they will both get copied over unless specified.
     
  9. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,128
    105,643
    450
    I dunno if it can be coded but when using the x64 edition of the MCT ISO, the "ISO:\x64\Sources\$OEM$" folder will be copied.

    ps, ignoring the white noise.
     
  10. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,756
    240
    Well I answered my own question I suppose. It's just going to take some work because up until this point the location was independent except for the drive letter.
    Now the function needs to keep track of the architecture of the index being applied and pass on the information until the oemcopy function is done.
    So I need to find the architecture, save it to a variable, check that variable when copying the oem folder and look for a subfolder if the existing sources\$oem$ structure doesn't exist.
    Then if that architecture $oem$ subfolder does exist, copy that instead.

    Okay... I guess it isn't that daunting of a task...
     
  11. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,128
    105,643
    450
    @murphy78, for the time being i always used the mixed arch. alternative ISO option from "multi_arch_iso.cmd" by @abbodi1406 then the folder structure is default but then the $OEM$ folder needs to contain x86/x64 compatible stuff too.

    Not related but to inform:
    Apart from the $OEM$ folder copying is working that method has only one more advantage, the alternative ISO can boot x86 UEFI on x86 UEFI compatible systems, the standard multi-arch MCT ISO can't (and the alt. ISO can be a bit smaller than the MCT ISO).

    The x86 UEFI stuff is not used that much (i think) but the $OEM$ copying capability is (for me), so if the script can support Multi-Arch. MCT ISOs then we only need to create that one:)
     
  12. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,756
    240
    Well it was not very hard to implement actually, but I still have to test it... So I have to make an oem folder. I guess I could just put a single file called x64.txt or x86.txt in the proper folder structure in the MCT and load it in a vm.
     
  13. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,128
    105,643
    450
    You could put the MRP $OEM$ folder in to test + the generic ei.cfg when testing with a consumer sku:)
     
  14. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,756
    240
    Hmmm... the script installer does not use dual architecture media... will have to tinker a bit.
     
  15. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,128
    105,643
    450
    When booting the MCT (like) ISO, you select x86 or x64 and next a normal setup starts and menu.cmd works too.
     
  16. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,428
    11,756
    240
    New Version 1.3.1:
    File Name: murphy78-Diskpart-Apply-v1.3.1.zip
    File Size: 2.4.1 MB
    File type: zip/pw
    PW: MDL2021
    sha-1 hash: D0D59CB47AE8A3135998D309CD4A46AC660CC327
    File link: https://mir.cr/0TQGML1N

    1.3.1 Added Media Creation Tool style x86/x64 $oem$ folder copying that would detect the architecture of the install applied and seek the appropriate $oem$ subfolder to copy
    Re-worked the add diskpart apply image script to be in line with the support for the default and dual boot format
    Added esd and split wim support for the add diskpart apply image script for the line that used to detect information from the install.wim
    Minor other tinkerings not worth mentioning, mostly wording or spacing issues
     
  17. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    50,128
    105,643
    450
    #258 Enthousiast, Jul 14, 2021
    Last edited: Jul 14, 2021
    Confirmed working:)
    [​IMG]

    [​IMG]
     
  18. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    1,278
    930
    60
    Hi @murphy78 ! So we can integrate and use DaRT in boot.wim and winre.wim with your new script ? :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...