abbodi1406's Batch Scripts Repo

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

    thank you brother .
    yes i saw progress with script success but no any new iso is created.
    if i leave dism blank it defualt select adk but script close after unpacking updates but if c:\windows\system32\dism.exe is selected it continues forward to mount wim & integreate updates .
    i have now set repo to updates folder location now .

    brother one question if get waik tools by jfx is supported then it will be easy for everybody & theres no need to download whole adk + pe iso's framework from microsoft.
    i hope my request will be taken under consideration & be updated in next release.
     
  1. abbodi1406

    abbodi1406 MDL KB0000001

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

    you can use get waik tools and specify custom dism.exe location

    WinPE iso is never needed for updates
     
  2. everything is working fine now .
    updated LTSC2019 genuine msdn iso to latest 17763.914 without any issue .
    working fine after installed as guest OS on workstation + no any updates found while checking manually via windows updates.
    exe installer files needs to be installed via $$oem$$ folder setupcomplete script.
    Another Great Script by Brother Abbodi1406.

    brother i have one more question about your kms vl all version 36 script activates LTSC2019 for 6 months only via oem method while KMS Suite 8.2 by Mephistoo (tnctr community) activates it till 2038 .

    i used kms38 $$OEM$$ folder extracted via both scripts [ yours as well as mephistoo]
     
  3. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
  4. the_soft45

    the_soft45 MDL Member

    Mar 28, 2016
    217
    134
    10
    Would it be possible at all to update this script to work with LTSB 2015 (10240) images? I'm trying to create an updated LTSB ISO using W10UI and I came across the offline error bug mentioned previously.
    Even better would be to somehow incorporate these fixes into W10UI.
    Sure, not many are interested in offline updating LTSB 2015 or x86 LTSB 2016, but it could be useful to cover all bases.

    BTW, hope you had a great holiday season :cold:
     
  5. abbodi1406

    abbodi1406 MDL KB0000001

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

    I believe MSMG Toolkit have the fix for 10240
    if you feel you don't want to use it, i could upload fix pack for it

    i'm trying to keep W10UI independent, and don't carry external files :)
     
  6. the_soft45

    the_soft45 MDL Member

    Mar 28, 2016
    217
    134
    10
    Where is it? I can't seem to find the fix in the file structure of MSMG.

    EDIT: Just found it. It's located in BIN\Patches\W10CUFix
     
  7. Hasefroch

    Hasefroch MDL Senior Member

    Dec 24, 2018
    434
    258
    10
    In October I created an updated ISO of LTSB 2016, it created correctly, but when I'm trying to boot and install it (UEFI firmware and Rufus), when it ends installation of Windows (the percentage is 100%), appears the Windows Install now screen, and the system isn't installed at all, when I reboot it came the message No operating system installed, ¿it's a bug of W10UI or a bug in the cumulative update of LTSB 2016? I will try with December update and latest W10UI to create ISO
     
  8. the_soft45

    the_soft45 MDL Member

    Mar 28, 2016
    217
    134
    10
    Same thing happened to me. I don't know if it's a bug in W10UI or in MS's updates, but my quick fix is to launch cmd by hitting Shift+F10 and running the following command:
    Code:
    bcdboot W:\Windows /l pt-pt /s S: /f UEFI
    The first directory path is where Windows is installed and the second is the boot drive. To find the drive letters to each I just open Notepad beforehand and hit "Open". That way you can see all of the drives. The boot drive is around 100MB, while the Windows drive occupies the entirety of the disk.
    After running the command I just exit setup and let the computer boot normally.
    Hope this helps!
     
  9. Hasefroch

    Hasefroch MDL Senior Member

    Dec 24, 2018
    434
    258
    10
    Thanks! I use Spanish so it will es-mx instead of pt-pt
     
  10. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
  11. ananhaid

    ananhaid MDL Member

    Oct 16, 2017
    246
    221
    10
    uup-converter-42 suggest:
    1, if *.cab not find in UUPs folder and netfx3=1, it will not add netfx3 feature and process exit. plz add check to let add feature contiune.

    2, converted the install image done, the wim info not complete.
    Code:
            <DISPLAYNAME>Windows 10 xxx</DISPLAYNAME>
            <DISPLAYDESCRIPTION>Windows 10 xxx</DISPLAYDESCRIPTION>
    
    the string missing not set up.
    (the create_virtual_editions.cmd have process to set displayname and displaydescription for virtual wim.)
     
  12. abbodi1406

    abbodi1406 MDL KB0000001

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

    1) NetFx3 feature will only be added if updates are detected (becuase it's treated like an update in the script)

    otherwise, it's easier to enable the feature after installation, instead mounting/modifying install.wim

    2) You mean you want convert-UUP.cmd to set DISPLAYNAME/DISPLAYDESCRIPTION?
    it's not really needed
     
  13. KleineZiege

    KleineZiege MDL Expert

    Dec 11, 2018
    1,854
    2,107
    60
    yes I had to do with it this morning, I could not set flags if the image, from Pro, was set to Enterprsie,


    cmd code says made, but it is not

    1.
    check with code
    2. Thats Code

    Code:
    Windows Registry Editor Version 5.00
    
    ;4th version uses dism and Get-WimInfo instead of Get-ImageInfo (for outdated win7); force entry to appear (7-zip shell issue)
    ;3rd version adds support for vhd images, and lists all existing indexes details (detecting them adds a bit of slow at start)
    ;2nd version adds support for msu, and blindly listed first 3 indexes details, fast, but could list 'error"
    ;1st version undo (HCU unreliable, more so if having 7-Zip shell extensions, hence switched to HKCR)
    [-HKEY_CURRENT_USER\Software\Classes\.esd]
    [-HKEY_CURRENT_USER\Software\Classes\.wim]
    [-HKEY_CURRENT_USER\Software\Classes\.cab]
    [-HKEY_CURRENT_USER\Software\Classes\CABFolder]
    [-HKEY_CURRENT_USER\Software\Classes\Microsoft.System.Update.1]
    
    ;========================================================================================
    [HKEY_CLASSES_ROOT\.esd]
    @=-
    
    [-HKEY_CLASSES_ROOT\.esd\shell\DISMinfo]
    
    [HKEY_CLASSES_ROOT\.esd\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CLASSES_ROOT\.esd\shell\DISMinfo\command]
    @="powershell -noprofile -w Hidden -c \"Start-Process powershell -ArgumentList '-c \\\"$w=''%1'';$w;$c=(dism /Get-WimInfo /WimFile:$w) | sls ''Index'';for($i=1;$i -le $c.count;$i++){dism /Get-WimInfo /WimFile:$w /Index:$i;write-host (''=''*60)};timeout -1\\\"' -verb RunAs\""
    
    ;========================================================================================
    [HKEY_CLASSES_ROOT\.wim]
    @=-
    
    [-HKEY_CLASSES_ROOT\.wim\shell\DISMinfo]
    
    [HKEY_CLASSES_ROOT\.wim\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CLASSES_ROOT\.wim\shell\DISMinfo\command]
    @="powershell -noprofile -w Hidden -c \"Start-Process powershell -ArgumentList '-c \\\"$w=''%1'';$w;$c=(dism /Get-WimInfo /WimFile:$w) | sls ''Index'';for($i=1;$i -le $c.count;$i++){dism /Get-WimInfo /WimFile:$w /Index:$i;write-host (''=''*60)};timeout -1\\\"' -verb RunAs\""
    
    ;========================================================================================
    [HKEY_CLASSES_ROOT\Windows.VhdFile]
    @=-
    
    [-HKEY_CLASSES_ROOT\Windows.VhdFile\shell\DISMinfo]
    
    [HKEY_CLASSES_ROOT\Windows.VhdFile\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CLASSES_ROOT\Windows.VhdFile\shell\DISMinfo\command]
    @="powershell -noprofile -w Hidden -c \"Start-Process powershell -ArgumentList '-c \\\"$w=''%1'';$w;$c=(dism /Get-ImageInfo /ImageFile:$w) | sls ''Index'';for($i=1;$i -le $c.count;$i++){dism /Get-ImageInfo /ImageFile:$w /Index:$i;write-host (''=''*60)};timeout -1\\\"' -verb RunAs\""
    
    ;========================================================================================
    [HKEY_CLASSES_ROOT\.cab]
    @=-
    
    [-HKEY_CLASSES_ROOT\.cab\shell\DISMinfo]
    
    [HKEY_CLASSES_ROOT\.cab\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CLASSES_ROOT\.cab\shell\DISMinfo\command]
    @="powershell -noprofile -w Hidden -c \"Start-Process cmd -ArgumentList '/c dism /Online /Get-PackageInfo /PackagePath:\\\"%1\\\" &timeout -1' -verb RunAs\""
    
    ;========================================================================================
    [HKEY_CLASSES_ROOT\CABFolder]
    @=-
    
    [-HKEY_CLASSES_ROOT\CABFolder\shell\DISMinfo]
    
    [HKEY_CLASSES_ROOT\CABFolder\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CLASSES_ROOT\CABFolder\shell\DISMinfo\command]
    @="powershell -noprofile -w Hidden -c \"Start-Process cmd -ArgumentList '/c dism /Online /Get-PackageInfo /PackagePath:\\\"%1\\\" &timeout -1' -verb RunAs\""
    
    ;========================================================================================
    [HKEY_CLASSES_ROOT\Microsoft.System.Update.1]
    @=-
    
    [-HKEY_CLASSES_ROOT\Microsoft.System.Update.1\shell\DISMinfo]
    
    [HKEY_CLASSES_ROOT\Microsoft.System.Update.1\shell\DISMinfo]
    "MUIVerb"="DISM Info"
    "Icon"="C:\\Windows\\HelpPane.exe"
    "CommandFlags"=dword:00000010
    
    [HKEY_CLASSES_ROOT\Microsoft.System.Update.1\shell\DISMinfo\command]
    @="powershell -noprofile -w Hidden -c \"Start-Process cmd -ArgumentList '/c pushd \\\"%%temp%%\\\" &mkdir disminfo &Expand -F:*Properties.txt \\\"%1\\\" disminfo &pushd disminfo &type *.txt &del /f /q *.* &timeout -1'\""
     
  14. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
  15. abbodi1406

    abbodi1406 MDL KB0000001

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

    - Fixed x64 target detection on x86 host. Few code improvements.
     
  16. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,209
    90,791
    340
    Sorry for forgetting this

    is the issue/workaround for x64 only? or x86 Embedded too?
    thanks
     
  17. W10UI v7.6

    - Fixed x64 target detection on x86 host. Few code improvements.

    //

    Thanks a lot Brother it work like a charm now .
     
  18. KleineZiege

    KleineZiege MDL Expert

    Dec 11, 2018
    1,854
    2,107
    60
    sorry i know garnet more about what that was about, i was finished that evening.

    Sorry *g
     
  19. abbodi1406

    abbodi1406 MDL KB0000001

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

    - Fix for the unseen registry flush error, when updating x64 target on x86 host

    thanks to @achernov and @Enthousiast for reporting and multiple tests

    basically, x86 reg.exe (and maybe dism.exe) cannot properly handle > 60 MB registry hives for x64 target, in certain cases and with variable factors
    the hive then get stuck in the I/O buffer/cache/memory (whatever the correct technical term)
    Code:
    CBS Failed flushing store object key. [HRESULT = 0x800703f8 - ERROR_REGISTRY_IO_FAILED]
    CBS Warning: Failed to flush root store object. [HRESULT = 0x800703f8 - ERROR_REGISTRY_IO_FAILED]
    CBS Failed to flush offline registry: {bf1a281b-ad7b-4476-ac95-f47682990ce7}C:/Mount/Windows/System32/config/SOFTWARE. [HRESULT = 0x800703f8 - ERROR_REGISTRY_IO_FAILED]
    
    the fix is to save the loaded hive to another file before unloading, this correctly flush the loaded hive into both files
    and just to be sure, the current file is replaced with the new one