abbodi1406's Batch Scripts Repo

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

  1. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    Could you enable debug mode in W10UI.cmd and post the log?
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
  3. Lex24

    Lex24 MDL Junior Member

    Apr 14, 2018
    51
    47
    0
    #1823 Lex24, Mar 17, 2022
    Last edited: Mar 17, 2022
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    W10UI v10.17r

    - Fixed post-reboot online cleanup (or reset base)

    thanks to @Lex24 for the log
     
  5. Lex24

    Lex24 MDL Junior Member

    Apr 14, 2018
    51
    47
    0
    #1825 Lex24, Mar 19, 2022
    Last edited: Mar 19, 2022
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    Where is the failure exactly?

    first run after reboot will perform online cleanup or reset base (without checking or installing any updates)
    next run it return to normal behavior
     
  7. strotee

    strotee MDL Member

    Jan 30, 2011
    229
    205
    10
    Why not have the tool that downloads UUP files have an option for downloading the newest defender update? Or am I just blind and can't see it in the options?
     
  8. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,668
    103,485
    450
    That was already suggested for ndp lcu (only dev channel gets them) and other updates which are not provided by the uup system, it is a lot of hassle to synchronize this because the platform updates are not provided by the uup system (afaik).
     
  9. Lex24

    Lex24 MDL Junior Member

    Apr 14, 2018
    51
    47
    0
    Ok. In that case there is no failure. I just didn't see this mentioned anywhere in the documentation. I have done some testing updating Windows 11 and can see the following behaviour (when both Cleanup and ResetBase are set to 1):

    1) After booting to Windows in Safe Mode you need to run W10UI twice. Cleanup and ResetBase are performed during the first run and the updates are installed during the second run.

    2) After booting to WinPE (eg. Strelec WinPE10) you need to run W10UI only once. All the updates are installed first and Cleanup/ResetBase are performed later.

    I have also noticed that the cleanup seems to be more efficient when WinPE method is used, as shown on the screenshots of my drive C (Win11 22000.556).

    Safe Mode method:

    https://imagizer.imageshack.com/img923/3144/tY2Pb5.png

    WinPE method:

    https://imagizer.imageshack.com/img924/22/s38Kmi.png

    The reason to use the Safe Mode or WinPE is to prevent WU interfering with the cleanup and update process. In the Safe Mode the OS is "online" but without the network driver loaded, and with WinPE the OS is treated as an "offline image".
     
  10. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,730
    60
    #1830 AveYo, Mar 21, 2022
    Last edited: Mar 22, 2022
    It's The Same Picture
    ;)
    Don't over-complicate procedures for hardly measurable effect (actually, there should be a glaring speed difference in the reverse direction)
    edit: mea culpa
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    Well, it's mentioned in the changelog
    Code:
    5.9:
    - Added workaround to perform Cleanup System Image for current online OS after installing updates that require reboot to complete (i.e. Cumulative Update)
    how to:
    run W10UI.cmd and install updates, assuming you choose to cleanup OS image (with or without resetbase)
    restart system
    run W10UI.cmd again, it will go directly to Cleanup or Reset OS image (it doesn't install or check any updates)
    the idea of this behavior, is that you use W10UI to install all updates online, then reboot to perform cleanup afterward
    you usually don't leave any updates for a second run
    until new updates are released the next month (or week)
     
  12. Lex24

    Lex24 MDL Junior Member

    Apr 14, 2018
    51
    47
    0
    Thanks, I admit I didn't look so far down in the change log. I have to put "Change Log study" on my to-do list. My usage case is a bit unusual and on the extreme side, but it has been working quite well so far. Here is the summary, for the record:

    1) After an LCU has been released install it with W10UI in offline mode after booting to WinPE (with Cleanup and ResetBase set to 1). Then run cleanmgr.exe (Disk Cleanup) and create partition image of drive C.

    2) Use the computer as needed until the next LCU release. If you need to install any non-portable application on drive C treat this event just like another LCU (see p #3 below).

    3) When the next LCU has been released restore drive C from the image created in p. #1 above and repeat the whole procedure again.

    This way any bloat accumulated during the regular computer use (p. #2) is completely excluded from each update.

    By following this simple philosophy I managed to keep the size of drive C steady around 12 -13 GB since the release of leaked version of Win11 in June of 2021. So now my Windows behaves just like an average Linux distro (they never grow much in size either). Obviously, to achieve all this all portable applications as well as data must be placed on separate partition(s).
     
  13. AveYo

    AveYo MDL Expert

    Feb 10, 2009
    1,836
    5,730
    60
    WoW Scratch what I said previously, what you do it kinda extreme. I think you're in the primary audience for compact-os feature.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. erpsterm35

    erpsterm35 MDL Guru

    May 27, 2013
    2,043
    2,028
    90
    10.17r broken when run on ltsc 2019 v1809 as host os - after extracting files, window immediately closes & quits
    getting that problem consistently/constantly
     
  15. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    Only on 1809 host?
    could run cmd as admin, change to W10UI.cmd location, and execute it?
    this mostly won't close up the window when error occur
     
  16. 正义羊

    正义羊 MDL Senior Member

    Feb 21, 2016
    258
    152
    10
    Just wish, in uup-converter v79+, the step to add apps is expected to be placed before the step to add updates.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  17. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
  18. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,206
    90,780
    340
    #1838 abbodi1406, Mar 28, 2022
    Last edited: Mar 28, 2022
    (OP)
    uup-converter v79

    - Added support for Apps sorting and integration for builds 22563 and later
    including two new options: SkipApps, AppsLevel

    - Extended AutoStart option with two more values:
    3 = create install.wim only
    4 = create install.esd only

    - Added new option AutoExit (mainly for usage with AutoStart to run multi batch conversions)

    - Changed SkipBootFiles option (default 1) to UpdtBootFiles (default 0), to avoid confusion

    - Enhanced detection for wmic.exe tool based on existence (instead checking build number 22483 or later)

    thanks to @Paul Mercer, @RobrPatty, @Enthousiast and all who helped and tested beta scripts
     
  19. erpsterm35

    erpsterm35 MDL Guru

    May 27, 2013
    2,043
    2,028
    90

    doh! my mistake when I first set the target update path (aka. updates location) before setting the target OS path, which seems to "reset" the update location path when I do this with 10.17r. this doesn't happen if I set the target OS location/path first and then the updates location & then run the script which doesn't make the window close immediately & runs properly on host 1809/ltsc 2019. almost a bad habit for me to do number [2] first and then number [1] second when I should be really doing it the other way around

    anyways, I downgraded to & run the 10.17f version and made sure I set the target OS path first and then the updates location second
     
  20. KleineZiege

    KleineZiege MDL Expert

    Dec 11, 2018
    1,850
    2,105
    60
    Did the OfflineInsiderEnroll-2.6.1,
    actually also a silent switch ?
    I would like to include it in my Firstlogon.cmd.