abbodi1406's Batch Scripts Repo

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

  1. Atari800XL

    Atari800XL MDL Expert

    Apr 3, 2011
    1,002
    1,744
    60
    #961 Atari800XL, Jan 4, 2020
    Last edited: Jan 4, 2020
    Wow, that's some excellent research, @abbodi1406 !
    Maybe this is the same issue that I had with using x86 reg.exe on x64 hives on manual applies with Imagex:
    https://forums.mydigitallife.net/th...ion-and-deployment.59187/page-35#post-1461931

    At least it sheds new light on the issue, so new opportunities to test, etc.
    Thank you!

    EDIT: @abbodi1406 , under the "Download" header in the "W10UI" post, please change "v7.6" to "v7.7" (as the actual link is for v7.7)

    EDIT2: You mentioned this as the "the unseen registry flush error", and indeed it is so unseen, that I can't even reproduce the issue I mentioned in the quoted post now. But I'm sure it was real, so there are some very strange things going on...
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    @Atari800XL
    Yes, i guess it's the same cause

    that's what i ment by different factors and variables

    i could produce the issue on Win 8.1 x86 against Win 10 17763 or 18362
    whenever the SOFTWARE hive exceed 60 MB, it cannot be flushed (for N editions, the hive is slightly under 60 MB = no issue)
    testing the same scenario against 17134 or 16299 hives, both exceed 60 MB = no issue

    testing on 17763 x86 host gives different results, but the issue will occur at some point
    you can check Dism logs provided in these posts to see that (search for flush)
    https://forums.mydigitallife.net/th...-17763-xxx-pc-rs5.77945/page-299#post-1568165
    https://forums.mydigitallife.net/th...-1809-final-b-17763-xxx-pc-rs5.77945/page-300

    i call it unseen because reg.exe do not report any error, neither Event Log
    only dism gives a hint about the error, but it treats it as info event and continue the operation

    Process Monitor was very helpful tracking root cause (you will have to enable IRP_MJ_ and FASTIO_ filters)

    also, if/when the issue occur, using regedit.exe to load/unload the hive will suffer the same error
    so i guess the cause is in the registry api itself
     
  3. Atari800XL

    Atari800XL MDL Expert

    Apr 3, 2011
    1,002
    1,744
    60
    Thanks again, very interesting info!
    One of the most "obscure" (and difficult to reproduce) errors I've seen in a while!
     
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    Tell me about it, i spent entire day searching for registry flush errors, starting with Win 2000 value RegistrySizeLimit :D

    the closest thing i could get is this document about System registry hive limit of 32 MB in Server 2003/2008, but then removed starting Server 2008 R2
    ftp://ftp.hp.com/pub/servers/software/WindowsIntegrity/ManagingWindowsRegistry.pdf
     
  5. TheCollDude489

    TheCollDude489 MDL Member

    Apr 16, 2018
    147
    32
    10
    Sorry for the late reply, but it seems to be for x64 only, as x86 embedded does not seem to experience the issue.
     
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
  7. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
    Hello,
    Hope this finds you well.
    So it seams W10UI again cannot property detect DotNet update when trying to create an updated 20H1 ISO?
    I just created the Windows 10 20H1 using UUP, and used KB4534170 and KB4535550.:
    (I'm removing unneeded lines)
    Running W10UI v7.7
    1/2: windows10.0-kb4534170-x64.cab
    2/2: windows10.0-kb4535550-x64.cab
    Mounting sources\install.wim - index 1/1
    Checking Updates...
    Installing updates...
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    Image Version: 10.0.19041.1
    Processing 1 of 1 - Adding package Package_for_KB4534170~31bf3856ad364e35~amd64~~10.0.1.3108
    [==========================100.0%==========================]
    The operation completed successfully.
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    Image Version: 10.0.19041.1
    Processing 1 of 1 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.21.1.1
    [==========================100.0%==========================]
    The operation completed successfully.
    Adding .NET Framework 3.5 feature
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    Image Version: 10.0.19041.21
    Enabling feature(s)
    [==========================100.0%==========================]
    The operation completed successfully.
    Reinstalling cumulative update(s)...
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    Image Version: 10.0.19041.21
    Processing 1 of 2 - Adding package Package_for_KB4534170~31bf3856ad364e35~amd64~~10.0.1.3108
    [==========================100.0%==========================]
    Processing 2 of 2 - Adding package Package_for_RollupFix~31bf3856ad364e35~amd64~~19041.21.1.1
    [==========================100.0%==========================]
    The operation completed successfully.
    Seams Updating winre.wim and so on works fine.
    OK.
     
  8. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,679
    103,527
    450
  9. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    @armond

    I see that .NET update is correctly installed, so where is the issue exactly?
     
  10. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
  11. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
    Well, KB4534170 integrates before enabling DotNet3. But it also integrates one more time after enabling DotNet3,
    So yes seams that's not an issue otherwise.
    Thanks.
     
  12. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,679
    103,527
    450
    Did you update all wim's or only install.wim?
     
  13. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,679
    103,527
    450
    That's intended, it first installs all updates (and when selected, it runs the cleanup(s)), enables dotnetfx35 and reinstalls the CUs to update the installed dotnetfx35.
     
  14. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
    #974 armond, Jan 15, 2020
    Last edited: Jan 15, 2020
    OK but I believe it's not happening with 1903/1909.:
    KB4532938 integrates just once, after enabling DotNet3 if I correctly remember.
     
  15. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
    All WIMs. The default.
     
  16. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,679
    103,527
    450
  17. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
  18. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,679
    103,527
    450
    There is no default, when you select the install.wim as target it won't update boot.wim, did you target the install.wim or an extracted folder?

    On all builds it will first integrate the updates, run the selected cleanups, enable dotnetfx35 and next re-install the CUs to update them.
    Processing 3 of 3 - Adding package Package_for_DotNetRollup~31bf3856ad364e35~amd64~~10.0.1.3105 = KB4532938
     
  19. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    49,679
    103,527
    450
    This is when the install.wim is the target:
    Code:
    ============================================================
    [1] Target (x86): "j:\W10UI\18362.1_Work_x86_NL\sources\install.wim"
    
    [2] Updates: "j:\W10UI\18362.1_Updates_x86_1909"
    
    [3] DISM: "Windows 10 ADK"
    
    [4] Enable .NET 3.5: YES
    
    [5] Cleanup System Image: YES      [6] Reset Image Base: YES
    
    [7] Update WinRE.wim: YES
    
    [8] Install.wim selected indexes: 1 / [K] Keep indexes: Selected
    
    [M] Mount Directory: "c:\W10UImount_5913"
    
    [E] Extraction Directory: "J:\W10UItemp_20938"
    
    ============================================================
    Change a menu option, press 0 to start the process, or 9 to exit:
    Code:
    ============================================================
    Running W10UI v7.7
    ============================================================
    
    ============================================================
    Extracting files from update cabinets (.cab)
    *** This will require some disk space, please be patient ***
    ============================================================
    
    1/6: Windows10.0-KB4516115-x86_Flash.cab
    2/6: windows10.0-kb4517245-x86_1909_EP_New.cab
    3/6: windows10.0-kb4528759-x86_5b8f9efaacca2707e6fc0b70ffd48d4ba033de25.cab
    4/6: windows10.0-kb4528760-x86_2ab86a2964aeac75e15c687d1154a5c6ca68be34.cab
    5/6: windows10.0-kb4532938-x86-ndp48_dddba0fbf5845801862b2ec634ee0361dd4d42dc.cab
    6/6: windows10.0-kb4534726-x86_ca0a8bf85f256d5a705932eee98e291b516c4ee0.cab
    
    ============================================================
    Mounting install.wim - index 1/2
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Checking Updates...
    ============================================================
    
    ============================================================
    Installing servicing stack update...
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18362.1
    
    Processing 1 of 1 - Adding package Package_for_KB4528759~31bf3856ad364e35~x86~~18362.590.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Installing updates...
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18362.1
    
    Processing 1 of 3 - Adding package Package_for_KB4516115~31bf3856ad364e35~x86~~10.0.1.0
    [==========================100.0%==========================]
    Processing 2 of 3 - Adding package Package_for_KB4517245~31bf3856ad364e35~x86~~10.0.1.5
    [==========================100.0%==========================]
    Processing 3 of 3 - Adding package Package_for_DotNetRollup~31bf3856ad364e35~x86~~10.0.1.3105
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18362.1
    
    Processing 1 of 1 - Adding package Package_for_RollupFix~31bf3856ad364e35~x86~~18362.592.1.5
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Resetting OS image base
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18363.592
    
    [=====                      10.0%                          ]
    [===========================98.1%========================  ]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18363.592
    
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Adding .NET Framework 3.5 feature
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18363.592
    
    Enabling feature(s)
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Reinstalling cumulative update(s)...
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18363.592
    
    Processing 1 of 2 - Adding package Package_for_DotNetRollup~31bf3856ad364e35~x86~~10.0.1.3105
    [==========================100.0%==========================]
    Processing 2 of 2 - Adding package Package_for_RollupFix~31bf3856ad364e35~x86~~18362.592.1.5
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Updating winre.wim
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Mounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18362.1
    
    Processing 1 of 1 - Adding package Package_for_KB4528759~31bf3856ad364e35~x86~~18362.590.1.0
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18362.1
    
    Processing 1 of 1 - Adding package Package_for_KB4517245~31bf3856ad364e35~x86~~10.0.1.5
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18362.1
    
    Processing 1 of 1 - Adding package Package_for_RollupFix~31bf3856ad364e35~x86~~18362.592.1.5
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18362.592
    
    [===========================99.2%========================= ]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image Version: 10.0.18362.592
    
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image File : J:\W10UI\winre.wim
    Image Index : 1
    Saving image
    [==========================100.0%==========================]
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Exporting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Adding updated winre.wim
    ============================================================
    
            1 file(s) copied.
    
    ============================================================
    Unmounting install.wim - index 1/2
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.19041.1
    
    Image File : j:\W10UI\18362.1_Work_x86_NL\sources\install.wim
    Image Index : 1
    Saving image
    [==========================100.0%==========================]
    Unmounting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Rebuilding install.wim
    ============================================================
    
    Deployment Image Servicing and Management tool
    Version: 10.0.18362.1
    
    Exporting image
    [==========================100.0%==========================]
    The operation completed successfully.
    
    ============================================================
    Removing temporary extracted files...
    ============================================================
    
    
    ============================================================
       Finished
    ============================================================
    
    
    Press 9 to exit.
    
    
    Boot.wim is not updated.
     
  20. armond

    armond MDL Addicted

    Jun 16, 2008
    737
    240
    30
    Yes.
    Got my attention.
    Why update boot.wim? Why care about boot.wim?
    Is Microsoft updating boot.wim when releasing new ESDs at all?
    Thanks for pointing this out.