abbodi1406's Batch Scripts Repo

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

  1. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    1,237
    911
    60
    #1081 Chibi ANUBIS, Apr 4, 2020
    Last edited: Apr 4, 2020
    Report with Enterprise ARM64 MSI

    [​IMG]
    [​IMG]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,191
    84,698
    340
    @Chibi ANUBIS
    Thanks
    one last thing, can you run this in cmd?
    echo %ProgramFiles(x86)%
     
  3. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    1,237
    911
    60
    Code:
    C:\Users\Chibi ANUBIS>echo %programfiles(x86)%
    C:\Program Files (x86)
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. AeonX

    AeonX MDL Addicted

    May 24, 2013
    793
    719
    30
    @abbodi1406 in your UUP Convert script (convert-UUP.cmd) in the cleanup option has a warning "on 18362 and later, this removes the base RTM Edition packages" so what is the consequence of this?

    And could you explain the difference between using cleanup only or using resetbase in 18362 since both use SupersededActions = 3? What is the difference between SupersededActions equal to 0, 1 or 3?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Chibi ANUBIS

    Chibi ANUBIS MDL Chibi Developer

    Apr 28, 2014
    1,237
    911
    60
    Work perfectly ! :)

    [​IMG]
    [​IMG]
    [​IMG]
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,191
    84,698
    340
    It may break some future CU installation

    both have same effect
    remove components superseded by CU + compress components superseded by other updates (ssu, flash, .net)
     
  7. Supern00b

    Supern00b MDL Addicted

    Dec 30, 2010
    728
    540
    30
    Hi Abbodi1406, awesome work again, I'm using a lot of your scripts on a daily basis.
    Can you make the script so that it is possible to pass certain parameters on the command line?
    Such as architecture, language code? On a 64 bit system it installs x86 by default.
    I remember in WUI it was possible to set some variables inside the script, this would also be nice here.
    Your script already does a silent Edge install, now if it can be unattended by passing variables it will be perfect.

    Cheers.
     
  8. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,191
    84,698
    340
    #1089 abbodi1406, Apr 7, 2020
    Last edited: Apr 7, 2020
    (OP)
    Architecture is determined by the offline installer (e.g. MicrosoftEdge_X64_80.0.361.103.exe)
    the installation location "C:\Program Files (x86)" is by MS design, for x64 or x86

    the script shows a menu for Language selection

    if you mean to create command line switches for the script to do unattended installation, it's doable
     
  9. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,191
    84,698
    340
    Good?
    ## Command Line Switches

    * All switches are case-insensitive, works in any order, but must be separated with spaces

    * You can use the long form or the short form for channel and level

    * Architecture is determined based on the detected offline installer
    for Windows x64/arm64, 64-bit installer takes precedence if detected with 32-bit installer (x86)

    - language:
    Code:
    /L lang
    mandatory switch, it must be specified

    - channel:
    Code:
    /Canary
    /Dev
    /Beta
    /Stable
    /CC
    /CD
    /CB
    /CS
    if not specified, default is Stable
    if multiple switches are specified, the last one takes precedence

    - installation level:
    Code:
    /System
    /User
    /S
    /U
    if not specified, default is System (with admin privileges), or User (without admin privileges)
    if multiple switches are specified, the last one takes precedence
    Canary channel always default to User level

    * Examples:

    install Edge Canary, french language
    Code:
    EdgeChromiumInstaller.cmd /canary /l fr
    install Edge Stable, english language, system level
    Code:
    EdgeChromiumInstaller.cmd /l en
    EdgeChromiumInstaller.cmd /L en /Stable
    EdgeChromiumInstaller.cmd /L en /Stable /System
    install Edge Beta, chinese language, system level
    Code:
    EdgeChromiumInstaller.cmd /Beta /System /L zh-cn
    EdgeChromiumInstaller.cmd /l zh-cn /cb /s
     
  10. Supern00b

    Supern00b MDL Addicted

    Dec 30, 2010
    728
    540
    30
    Wow hahaha, not good, it's perfect!
    Thank you so much Abbodi!

    Cheers.
     
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,191
    84,698
    340
  12. humsearshad

    humsearshad MDL Junior Member

    May 8, 2014
    90
    12
    0
    Can someone help me with a batch script for unattended installation of a list of .exe and .msi applications

    the script should be able to install any .exe or .msi application copied in the same folder where the batch script is executed.
     
  13. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,219
    94,590
    450
  14. #1095 Deleted member 1254778, Apr 14, 2020
    Last edited by a moderator: Apr 14, 2020
    Hey @abbodi1406!
    I was just testing your ECOI script and noticed something:

    The Edge installer uses X64 in the filename for 64-bit architecture.
    But you are using %PROCESSOR_ARCHITECTURE% for the variable xOS, so it always says that no Edge Offline Installer is detected.

    Possible fix:
    Code:
    if "!xOS!"=="AMD64" set "xOS=X64"
    
     
  15. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,191
    84,698
    340
  16. Beppi

    Beppi MDL Novice

    Jun 25, 2018
    3
    1
    0
    #1097 Beppi, Apr 17, 2020
    Last edited: Apr 17, 2020
    ============================================================
    Running W7ESUI v0.2
    ============================================================

    ============================================================
    Extracting .cab files from .msu files
    ============================================================

    1/1: windows6.1-kb4550964-x64_2a8ada96b48a57fd2d3a377c8635f420f237e71b.msu

    ============================================================
    Extracting files from update cabinets (.cab)
    *** This will require some disk space, please be patient ***
    ============================================================

    1/1: Windows6.1-KB4550964-x64.cab

    ============================================================
    Checking Updates...
    ============================================================

    ============================================================
    Installing updates...
    ============================================================

    ==== Error ====
    Windows6.1-KB4550964-x64 require SSU version 6.1.7601.24550

    ============================================================
    Removing temporary extracted files...
    ============================================================


    ============================================================
    Finished
    ============================================================

    Is there anything I can do to help?
    I've got KB4540688 already installed
     
  17. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,219
    94,590
    450
    Is the march ssu present?
     
  18. HamandCheese

    HamandCheese MDL Novice

    Oct 15, 2010
    7
    1
    0
    "require SSU version 6.1.7601.24550"

    You need the latest Servicing Stack Update installed first, you will have to do this every month when it is released

    Go to catalog.update.microsoft.com

    search: Servicing Stack Update

    Find the proper OS and bit version, then find the latest date for that, download and install.
     
  19. HamandCheese

    HamandCheese MDL Novice

    Oct 15, 2010
    7
    1
    0
    I do this every month when the latest W7 patches are released on Patch Tuesday