abbodi1406's Batch Scripts Repo

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

  1. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    It seems too advanced for me :D
     
  2. s1ave77

    s1ave77 Has left at his own request

    Aug 15, 2012
    16,104
    24,378
    340
    It's actually pretty simple. Create account at gitlab, create a project and copy the link for later (note: NO SPACES IN NAME ALLOWED!), get TortoiseGit (will show note and link for needed runtime), install, create a folder for the project, open and right-click to clone the git to the folder.

    Now you can push/commit to Git via right-click ... and done:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    C2R-Retail2Volume

    updated to support Office 2013 C2R
    old Office 2016 only pack is kept, just in case

    thanks to @NormieLyfe for great assistance
     
  4. NormieLyfe

    NormieLyfe MDL Novice

    May 1, 2017
    37
    37
    0
    Yey I contributed to something :D:angel_not: Thank you @Abbodi1406
     
  5. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    #125 abbodi1406, Sep 20, 2017
    Last edited: Sep 20, 2017
    (OP)
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    Edit:
    WHD-W81UI reverted to v2.5
    since new hyper-v integration services update is taken down
     
  7. jackmonter5

    jackmonter5 MDL Senior Member

    Jul 27, 2009
    480
    167
    10
    #127 jackmonter5, Sep 27, 2017
    Last edited: Sep 27, 2017
    works perfectly, i have another request, (hope i'm not being a pest), if possible to flush the temp folder before commiting the changes to wim (as they are not needed anymore).

    (reason for my request is that the most space i can give my ram drive is 17.4gb, and apperently thats not enogh for ltsb update to b1737. when i saw the low disk warning i quickly flushed the temp folder and it was able to finish successfully)


    also is there anyway to see the build of wim file without mounting the wim?

    if i type: dism /get-wiminfo /wimfile:install.wim /index:1 i get:

    for CU
    Version : 10.0.15063
    ServicePack Build : 296
    ServicePack Level : 0

    and
    for AU
    Version : 10.0.14393
    ServicePack Build : 1198
    ServicePack Level : 0

    both should be b608 and b1737.

    thanks!!!
     
  8. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    Not quite possible with the current script routine, specially when updating wim/dvd
    wim indexes are processed one at a time (mount, update, unmount)
    so the extracted files are needed for all indexes in install.wim, and/or boot.wim

    that "OS Build" thing number is just a registry value that Microsoft set to track/differentiate CUs
    it's does not affect or represent wim image version

    you need to use external program to check it
    wimlib-imagex:
    Code:
    wimlib-imagex.exe dir install.wim 1 --path=Windows\Winsxs\Manifests | find /i "microsoft-windows-coreos-revision"
    7-zip:
    go to \Windows\Winsxs\Manifests
    find this file (the higher version)
    x64: amd64_microsoft-windows-coreos-revision
    x86: x86_microsoft-windows-coreos-revision
     
  9. jackmonter5

    jackmonter5 MDL Senior Member

    Jul 27, 2009
    480
    167
    10
    this command dosen't work for me is there a typo perhaps?

    7zip works good but requires a boatload of scrolling

    thanks again!!!
     
  10. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    No typo, it works very well
    Code:
    wimlib-imagex.exe dir install.wim 1 --path=Windows\Winsxs\Manifests | find /i "microsoft-windows-coreos-revision"
    
    \Windows\WinSxS\Manifests\x86_microsoft-windows-coreos-revision_31bf3856ad364e35_10.0.15063.0_none_9376583e90701033.manifest
    of course you need the correct path for wimlib-imagex
     
  11. jackmonter5

    jackmonter5 MDL Senior Member

    Jul 27, 2009
    480
    167
    10
    interesting, i get no output at all, skips a blank line and just goes back to cmd prompt. if i put > c.txt then i get an empty c.txt. what could be the problem :confused:
     
  12. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    Try without the | find part
     
  13. jackmonter5

    jackmonter5 MDL Senior Member

    Jul 27, 2009
    480
    167
    10
    #133 jackmonter5, Oct 3, 2017
    Last edited: Oct 3, 2017
    ok i got it working, by downloading a fresh copy and it is working great!

    thanks abbodi :worthy:

    btw any tricks to do the same for Win8/2012?
     
  14. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    Win 7/8.1 don't have that "OS Build" propaganda thing visibly

    but they added similar manifest to Monthly Rollup update
    Code:
    wimlib-imagex.exe dir install.wim 1 --path=Windows\Winsxs\Manifests | find /i "microsoft-windows-rollup-version"
     
  15. AeonX

    AeonX MDL Addicted

    May 24, 2013
    793
    719
    30
    #135 AeonX, Oct 4, 2017
    Last edited: Oct 4, 2017
    I changed the path of the dismroot variable in the WHD-W81UI script to use WADK and the update KB3172729 was not integrated into install.wim. Using the default path the update is integrated.

    Are there any side effects if I comment this line of the script?
    Code:
    if /i %kb%==KB3172729 (if /i "%dismroot%" NEQ "%windir%\system32\dism.exe" set /a _sum-=1&set /a _msu-=1&goto :eof
    Or is there a better way to force the script to use WADK build 14393?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    There was a post from one member saying that KB3172729 will fail to integrate if you use ADK's dism on Windows 7 Host OS

    so that line is to ensure it only get integrated on Windows 8.1/10 Host OS
    but you may comment it

    using ADK 10 to service Windows 7/8.1 images might cause errors
    however, you can search for all instance of KitsRoot81 and replace with KitsRoot10
     
  17. AeonX

    AeonX MDL Addicted

    May 24, 2013
    793
    719
    30
    I'm on Windows 10 Host OS but I plan to migrate to Windows 8.1.

    But for now in Windows 10 Host the best would be to use WADK 8.1 Kit to avoid possible errors? Thanks for the clarifications.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  18. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    16,197
    84,757
    340
    I never tried servicing 8.1 image on 10, but i think system's dism would be fine
     
  19. mb_force

    mb_force MDL Junior Member

    Mar 24, 2017
    76
    12
    0
    #139 mb_force, Oct 7, 2017
    Last edited by a moderator: Oct 7, 2017
    hi
    can someone help me with a script "SetupComplete.cmd"
    for instaling this "KB4013214" in both architectures?

    there are wo version of this file, for both architectures

    Thanks

    I Try this

    Code:
    @echo off
    for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\sources\install.wim set CDROM=%%i:
    echo Found CD-Rom as drive %CDROM%
    
    :Updates
    echo Installing Updates
    IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\Files\windows10.0-kb4013214_1-x64.msi /Q
    IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\Files\windows10.0-kb4013214_1-x86.msi /Q
    
    :Updates 2
    echo Installing Updates 2
    IF EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\Files\windows10.0-kb4013214_2-x64.msi /Q
    IF NOT EXIST %SystemRoot%\SysWOW64 start /wait %CDROM%\Files\windows10.0-kb4013214_2-x86.msi /Q
    
    DEL /F /Q %0% >nul
    exit
    
    but it takes more than two hour to install

    Folders:

    $OEM$\$$\Setup\Scripts
    $OEM$\$$\Setup\Files
     
  20. AeonX

    AeonX MDL Addicted

    May 24, 2013
    793
    719
    30
    One last doubt, if I use WADK 8.1 on Windows 10 Host OS does the WHD-W81UI script automatically detect? I did not test for myself because integrating the updates takes a lot of time :p

    I want to use the same version of Dism for everything however I servicing the image with MSMG Toolkit also to remove some packages and this uses ADK Insider Preview.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...