abbodi1406's Batch Scripts Repo

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

  1. vze2mp9g

    vze2mp9g MDL Addicted

    Oct 13, 2012
    660
    117
    30
    #921 vze2mp9g, Dec 2, 2019
    Last edited: Dec 2, 2019
    Yes, I do remember, but I would have to do that for 25 files. I was trying how to make it easier if I copied all the file names, paste them and somehow create a batch script that might work. I am not a script coder. I'll make another attempt and hopefully let you know how I made out. If I don't, I'll post my script and you might see where I'm having issues.

    Here is the list of files to be renamed
    Code:
    microsoft-windows-languagefeatures-basic-ar-sa-package-amd64.cab
    microsoft-windows-languagefeatures-basic-bg-bg-package-amd64.cab
    microsoft-windows-languagefeatures-basic-cs-cz-package-amd64.cab
    microsoft-windows-languagefeatures-basic-da-dk-package-amd64.cab
    microsoft-windows-languagefeatures-basic-de-de-package-amd64.cab
    microsoft-windows-languagefeatures-basic-el-gr-package-amd64.cab
    microsoft-windows-languagefeatures-basic-en-gb-package-amd64.cab
    microsoft-windows-languagefeatures-basic-en-us-package-amd64.cab
    microsoft-windows-languagefeatures-basic-es-es-package-amd64.cab
    microsoft-windows-languagefeatures-basic-es-mx-package-amd64.cab
    microsoft-windows-languagefeatures-basic-et-ee-package-amd64.cab
    microsoft-windows-languagefeatures-basic-fi-fi-package-amd64.cab
    microsoft-windows-languagefeatures-basic-fr-ca-package-amd64.cab
    microsoft-windows-languagefeatures-basic-fr-fr-package-amd64.cab
    microsoft-windows-languagefeatures-basic-he-il-package-amd64.cab
    microsoft-windows-languagefeatures-basic-hr-hr-package-amd64.cab
    microsoft-windows-languagefeatures-basic-hu-hu-package-amd64.cab
    microsoft-windows-languagefeatures-basic-it-it-package-amd64.cab
    microsoft-windows-languagefeatures-basic-ja-jp-package-amd64.cab
    microsoft-windows-languagefeatures-basic-ko-kr-package-amd64.cab
    microsoft-windows-languagefeatures-basic-lt-lt-package-amd64.cab
    microsoft-windows-languagefeatures-basic-lv-lv-package-amd64.cab
    microsoft-windows-languagefeatures-basic-nb-no-package-amd64.cab
    microsoft-windows-languagefeatures-basic-nl-nl-package-amd64.cab
    microsoft-windows-languagefeatures-basic-pl-pl-package-amd64.cab
    microsoft-windows-languagefeatures-basic-pt-br-package-amd64.cab
    microsoft-windows-languagefeatures-basic-pt-pt-package-amd64.cab
    microsoft-windows-languagefeatures-basic-ro-ro-package-amd64.cab
    microsoft-windows-languagefeatures-basic-ru-ru-package-amd64.cab
    microsoft-windows-languagefeatures-basic-sk-sk-package-amd64.cab
    microsoft-windows-languagefeatures-basic-sl-si-package-amd64.cab
    microsoft-windows-languagefeatures-basic-sr-cyrl-rs-package-amd64.cab
    microsoft-windows-languagefeatures-basic-sr-latn-rs-package-amd64.cab
    microsoft-windows-languagefeatures-basic-sv-se-package-amd64.cab
    microsoft-windows-languagefeatures-basic-th-th-package-amd64.cab
    microsoft-windows-languagefeatures-basic-tr-tr-package-amd64.cab
    microsoft-windows-languagefeatures-basic-uk-ua-package-amd64.cab
    microsoft-windows-languagefeatures-basic-zh-cn-package-amd64.cab
    microsoft-windows-languagefeatures-basic-zh-tw-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-cs-cz-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-da-dk-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-de-de-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-el-gr-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-en-gb-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-en-us-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-es-es-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-es-mx-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-fi-fi-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-fr-fr-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-hr-hr-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-it-it-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-ja-jp-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-ko-kr-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-nb-no-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-nl-nl-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-pl-pl-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-pt-br-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-pt-pt-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-ro-ro-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-ru-ru-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-sk-sk-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-sl-si-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-sr-cyrl-rs-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-sr-latn-rs-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-sv-se-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-tr-tr-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-zh-cn-package-amd64.cab
    microsoft-windows-languagefeatures-handwriting-zh-tw-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-ar-sa-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-bg-bg-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-cs-cz-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-da-dk-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-de-de-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-el-gr-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-en-gb-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-en-us-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-es-es-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-es-mx-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-fi-fi-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-fr-ca-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-fr-fr-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-hr-hr-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-hu-hu-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-it-it-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-ja-jp-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-ko-kr-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-nb-no-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-nl-nl-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-pl-pl-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-pt-br-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-pt-pt-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-ro-ro-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-ru-ru-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-sk-sk-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-sl-si-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-sr-cyrl-rs-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-sr-latn-rs-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-sv-se-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-tr-tr-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-zh-cn-package-amd64.cab
    microsoft-windows-languagefeatures-ocr-zh-tw-package-amd64.cab
    microsoft-windows-languagefeatures-speech-da-dk-package-amd64.cab
    microsoft-windows-languagefeatures-speech-de-de-package-amd64.cab
    microsoft-windows-languagefeatures-speech-en-gb-package-amd64.cab
    microsoft-windows-languagefeatures-speech-en-us-package-amd64.cab
    microsoft-windows-languagefeatures-speech-es-es-package-amd64.cab
    microsoft-windows-languagefeatures-speech-es-mx-package-amd64.cab
    microsoft-windows-languagefeatures-speech-fr-ca-package-amd64.cab
    microsoft-windows-languagefeatures-speech-fr-fr-package-amd64.cab
    microsoft-windows-languagefeatures-speech-it-it-package-amd64.cab
    microsoft-windows-languagefeatures-speech-ja-jp-package-amd64.cab
    microsoft-windows-languagefeatures-speech-pt-br-package-amd64.cab
    microsoft-windows-languagefeatures-speech-zh-cn-package-amd64.cab
    microsoft-windows-languagefeatures-speech-zh-tw-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-ar-sa-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-bg-bg-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-cs-cz-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-da-dk-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-de-de-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-el-gr-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-en-gb-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-en-us-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-es-es-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-es-mx-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-fi-fi-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-fr-ca-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-fr-fr-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-he-il-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-hr-hr-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-hu-hu-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-it-it-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-ja-jp-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-ko-kr-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-nb-no-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-nl-nl-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-pl-pl-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-pt-br-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-pt-pt-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-ro-ro-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-ru-ru-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-sk-sk-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-sl-si-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-sv-se-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-th-th-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-tr-tr-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-zh-cn-package-amd64.cab
    microsoft-windows-languagefeatures-texttospeech-zh-tw-package-amd64.cab
    
    When I was attending Rowan University in Glassboro, New Jersey (USA), I was taking a course in Workshop in Art Drawing ( I needed to take an elective to get my Bachelors degree). The teacher told me that he was going to give me a C, but instead, he gave me a B because I asked allot of questions the other students were afraid to ask. I was about eight years older than most of the other students.

    Please keep in mind, I am doing this as a challenge and a learning experience.
    Thank you for replying....
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    #922 abbodi1406, Dec 3, 2019
    Last edited: Dec 3, 2019
    (OP)
    @vze2mp9g

    make sure to set/change the _version if needed
     

    Attached Files:

  3. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    To workaround this, we can run oscdimg or cdimage from inside the target folder root and create the iso in the same folder, then move it
    as long as the isofile name don't contain restricted characters

    e.g.
    Code:
    cd /d "%target%"
    "path_to\oscdimg.exe" -m -o -u2 -udfver102 -bootdata:2#p0,e,b".\boot\etfsboot.com"#pEF,e,b".\efi\microsoft\boot\efisys.bin" -l"label" . file.iso
    move /y file.iso "%workdir%\"
    cd /d "%workdir%"
     
  4. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,479
    1,474
    60
    Yes, it's better not to use restricted characters for the isofile name : cdimage/oscdimage doesn't fail, but the filename is not the expected filename. But this has no importance since you build a filename with "good" characters :)
     
  5. vze2mp9g

    vze2mp9g MDL Addicted

    Oct 13, 2012
    660
    117
    30
    @abbodi1406
    You are indeed a master script writer!! There was no way, I could even come up with what you've done. IMHO, you should get another ten (10) trophy points... :mml:
     
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    W10UI v7.5

    - Code improvements and fixes.

    - Added option wim2esd to convert install.wim to install.esd
    only for distribution target (i.e. extracted or mounted iso)
     
  7. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
    #927 armond, Dec 4, 2019
    Last edited: Dec 4, 2019
    Aah, Thanks for this one. So no need to run ESD2WIM anymore?
    Also I guess it uses DISM not wimlib? wimlib not providing more commpression and using less memory/CPU/time?
     
  8. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    uup-converter-wimlib v42

    -
    @armond
    yes, it uses DISM, i'm trying to keep Update Installer scripts without extra payload :)

    it is your choice, i don't think the difference in required time/resources is notable
     
  9. TheCollDude489

    TheCollDude489 MDL Member

    Apr 16, 2018
    147
    32
    10
    Not sure if this is too much to ask, but is it possible that one of the fixes for the ie4uint.exe crash that happens whenever you install/integrate IE 10 or 11 updates into a Windows Embedded Standard 7 or Windows Embedded POSReady 7 WIM file be included in the WHD-W7UI script? Some people might be moving to these versions of Windows to get the extra support from Microsoft in the near future and this error might annoy them or make them worried their installation might be broken/corrupted.

    The methods were posted on here (https://blogs.msdn.microsoft.com/wi...file-creation-crash-workaround-for-wes7-pos7/) but I've only tried the second method posted by the user "Erica Asa" on that page:

     
  10. ananhaid

    ananhaid MDL Member

    Oct 16, 2017
    246
    221
    10
    #930 ananhaid, Dec 6, 2019
    Last edited: Dec 6, 2019
    Tested results:

    /compress:recovery got the esd is little bit smaller than /compress:LZMS(7.5 esd opinions)

    and recovery is officially document included.
     
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    Both are the same for Dism

    how did you measure the difference?
    did you exported (converted) same install.wim to install.esd?
     
  12. ananhaid

    ananhaid MDL Member

    Oct 16, 2017
    246
    221
    10
    yep, same wim(compress:max default) to esd

    3 649 411 072 - LZMS
    3 630 401 536 - recovery

    test 3 times.

    always recovery smaller. negligible size.
     
  13. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    #933 abbodi1406, Dec 6, 2019
    Last edited: Dec 6, 2019
    (OP)
    YAOCTRI v8.2

    Minor release with workaround for "%temp%" path, in case it's ended with backslash \
    expand.exe cannot extract cab file in that case

    additionally, findstr.exe cannot handle paths with some unicode characters, but find.exe can
     
  14. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,674
    103,519
    450
    #934 Enthousiast, Dec 6, 2019
    Last edited: Dec 7, 2019
    This is my experience:
    Method Used:
    Code:
    wimlib-imagex export "install.wim" ALL "install.esd" --compress=LZMS --solid
    Code:
    Name: install.esd
    Size: 3226394652 bytes (3076 MiB)
    same as:
    Method Used:
    Code:
    WIM<>ESD v7
    Code:
    Name: install.esd
    Size: 3226394652 bytes (3076 MiB)
    Method Used:
    Code:
    dism /Export-Image /SourceImageFile:"install.wim" /all /DestinationImageFile:"install.esd" /Compress:recovery
    Code:
    Name: install.esd
    Size: 3337885826 bytes (3183 MiB)
    
    Method Used:
    Code:
    dism /Export-Image /SourceImageFile:"install.wim" /all /DestinationImageFile:"install.esd" /Compress:lzms
    Code:
    Name: install.esd
    Size: 3337885826 bytes (3183 MiB)
     
  15. rpo

    rpo MDL Expert

    Jan 3, 2010
    1,479
    1,474
    60
    I had a cmd script with "chcp 1252" and findstr was hanging.
     
  16. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    WHD-W81UI v6.0 / WHD-W7UI v6.0

    changes:
    - lite revamp with backported features of W10UI
    - support for configuration files WHD-W81UI.ini / WHD-W7UI.ini
    - polished menu with more options
    - new manual option wim2esd (for WHD-W81UI only)
    - implemented debug mode
    - code improvemens and fixes to avoid paths issues

    WHD-W7UI extra changes:
    - optimized checking Security Updates
    - added detection support for Windows 10 ADK (for imagex.exe and oscdimg.exe only)
    - added theoretical support if Win7 build is bumped to 7602 after ESU
    - added support to suppress the new EOS notification (introduced in latest rollup)
    - new extended servicing stack update KB4531786
     
  17. mhussain

    mhussain MDL Senior Member

    Oct 1, 2012
    368
    144
    10
    hi there,
    love your kmsvl all script thank you! :)
    would it be possible to have your kmsvl all releaces uploaded to github??
    I note that your kms vl aio is uploaded?
    would be easia to access?
    thanks for your scripts!
    Majid
     
  18. abbodi brother i want to know what does "REPO" mean in Win10UI Script Configuration File. What to set there.
    also after completion of project no any iso is created even iso dir is set to same path of script. what am i missing so that its not able to create new iso.
    win10adk + pe is already installed on same system which is a guest os not host.
     
  19. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    Repo = repository = updates location

    did you saw the cmd windows progess? does it have any errors?
    you don't need to set ISODir to the script's directory, leave it blank