Windows 10: Unable to install a patch on windows 10 1607

Discus and support Unable to install a patch on windows 10 1607 in Windows 10 Installation and Upgrade to solve the problem; I am trying to write a batch script to help users in our company to upgrade their computers to support edge browser and it's IE mode. @echo off... Discussion in 'Windows 10 Installation and Upgrade' started by GuogangFan, Sep 2, 2020.

  1. Unable to install a patch on windows 10 1607


    I am trying to write a batch script to help users in our company to upgrade their computers to support edge browser and it's IE mode.


    @echo off

    color 1a

    setlocal enableextensions enabledelayedexpansion


    set LOGFILE=c:\edgesetup.log

    set CDN=http://172.31.25.14/soft

    set TRACKER=http://172.31.202.197:5000


    rem ni da ye hai shi ni da ye

    echo ==========================================================

    echo Win10 x64 C@V2VZDEZH

    echo ==========================================================

    echo=


    fltmc >>%LOGFILE%2>&1

    echo %date% %time% [E]: Elevated Privilege Needed! >>%LOGFILE%2>&1

    echo 5

    timeout 5

    exit



    for /F "tokens=* USEBACKQ" %%F in `ver` do

    set VER=%%F



    if "%PROCESSOR_ARCHITECTURE%"=="x86"

    echo %date% %time% [E]: CPU Architecture Not Supported! >>%LOGFILE%2>&1

    echo 32Windows 105

    timeout 5

    exit

    else

    set ARCH=x64



    for /f "tokens=4-8 delims=[.] " %%i in 'ver' do @if%%i==Version set verstr=%%j.%%k.%%l.%%melse set verstr=%%i.%%j.%%k.%%l


    for /f "tokens=1-5 delims=." %%i in 'echo %verstr%' do @

    set OSV=%%i.%%j

    set BLD=%%k

    set MIV=%%l



    if not defined MIV set MIV=0

    echo %date% %time% [D] %OSV% %BLD% %MIV% >>%LOGFILE% 2>&1


    if not %OSV% == 10.0

    echo %date% %time% [E] not Windows 10! >>%LOGFILE%2>&1

    echo Windows 105

    timeout 5

    exit



    set tempdir=edgesetup

    mkdir C:\%tempdir%


    rem 1909

    if %BLD% equ 18363 goto OA

    rem 1903

    if %BLD% equ 18362 if %MIV% lss 207 set KB=4501375 else goto OA

    rem 1809

    if %BLD% equ 17763 if %MIV% lss 592 set KB=4501371 else goto OA

    rem 1803

    if %BLD% equ 17134 if %MIV% lss 984 set KB=4512509 else goto OA

    rem 1709

    if %BLD% equ 16299 if %MIV% lss 1365 set KB=4512494 else goto OA

    rem 1703

    if %BLD% equ 15063 if %MIV% lss 2108 set KB=4520010 else goto OA

    rem 1607

    if %BLD% equ 14393 if %MIV% lss 3242 set KB=4516061 else goto OA

    rem 1511 not supported, not LTSC

    rem 1507 not supported, too old to catch up.


    if defined KB

    goto patch

    else

    echo %date% %time% [E] unsupported Windows 10 Version %OSV%.%BLD%.%MIV% >>%LOGFILE%2>&1

    echo Windows 10%OSV%.%BLD%.%MIV%5

    timeout 5

    exit



    :patch


    powershell -c "new-object System.Net.WebClient.DownloadString'%TRACKER%/g?oldV=%verstr%'" >C:\%tempdir%\secret.txt

    powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/aria2c.exe','C:\%tempdir%\aria2c.exe'" >>%LOGFILE%2>&1

    powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/win10/win10-%BLD%.torrent','C:\%tempdir%\win10-%BLD%.torrent'" >>%LOGFILE% 2>&1


    start /b "" cmd /c C:\%tempdir%\aria2c.exe -T C:\%tempdir%\win10-%BLD%.torrent -d C:\%tempdir%^>c:\bt.log 2^>^&1


    rem P2P download

    echo=

    echo -------------- --------------

    echo %date% %time% -------------- Downloading files... --------------- >>%LOGFILE%2>&1

    :waitdownload

    timeout /t 10 /nobreak > NUL

    type c:\bt.log findstr "SEED0.0" >nul2>&1

    if %ErrorLevel% neq 0 goto waitdownload

    echo

    echo=


    rem if BT download is not allowed, use this, but be careful with bandwith usage, better use multiple CDN servers.

    rem powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/win10/windows%OSV%-kb%KB%-%ARCH%.msu','C:\%tempdir%\win10-%BLD%\windows%OSV%-kb%KB%-%ARCH%.msu'">>%LOGFILE% 2>&1

    rem if %KB% == 4516061 powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/win10/windows%OSV%-kb4512574-%ARCH%.msu','C:\%tempdir%\win10-%BLD%\windows%OSV%-kb4512574-%ARCH%.msu'">>%LOGFILE% 2>&1

    rem powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/EcologyPlugin.zip','C:\%tempdir%\win10-%BLD%\EcologyPlugin.zip'">>%LOGFILE% 2>&1

    rem powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/MicrosoftEdgeEnterprise%ARCH%.msi','C:\%tempdir%\win10-%BLD%\MicrosoftEdgeEnterprise%ARCH%.msi'">>%LOGFILE% 2>&1

    rem powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/LGPO.exe','C:\%tempdir%\win10-%BLD%\LGPO.exe'">>%LOGFILE% 2>&1

    rem powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/gp.txt','C:\%tempdir%\win10-%BLD%\gp.txt'">>%LOGFILE% 2>&1

    rem powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/isz1.reg','C:\%tempdir%\win10-%BLD%\isz1.reg'">>%LOGFILE% 2>&1


    echo -------------- --------------

    if %KB% == 4516061

    echo %date% %time% -------------- Installing dependent patch KB4512574... --------------- >>%LOGFILE%2>&1

    mkdir C:\%tempdir%\4512574

    expand -F:* C:\%tempdir%\win10-%BLD%\windows%OSV%-kb4512574-x64.msu C:\%tempdir%\4512574 >>%LOGFILE% 2>&1

    for %%i in C:\%tempdir%\4512574\Windows%OSV%-KB4512574-x64*.cab do

    echo %date% %time% processing %%i >>%LOGFILE% 2>&1

    DISM.exe /Online /Add-Package /PackagePath:%%i /NoRestart >>%LOGFILE%2>&1

    systeminfo findstr "KB4512574" >>%LOGFILE%2>&1

    set IR=!ErrorLevel!

    echo install process return code is!IR! >>%LOGFILE%2>&1

    if !IR! == 0 echo%date% %time% KB4512574 installed successfully >>%LOGFILE%2>&1

    if !IR! == 0 echo KB4512574

    echo=




    echo %date% %time% -------------- Installing patch KB%KB%... --------------- >>%LOGFILE%2>&1

    mkdir C:\%tempdir%\%KB%

    rem

    expand -F:* C:\%tempdir%\win10-%BLD%\windows%OSV%-kb%KB%-x64.msu C:\%tempdir%\%KB% >>%LOGFILE%2>&1

    for %%i in C:\%tempdir%\%KB%\Windows%OSV%-KB%KB%-x64*.cab do

    echo %%i >>%LOGFILE% 2>&1

    DISM.exe /Online /Add-Package /PackagePath:%%i /NoRestart >>%LOGFILE%2>&1

    systeminfo findstr "%KB%" >>%LOGFILE%2>&1

    set IR=!ErrorLevel!

    echo !IR! >>%LOGFILE% 2>&1

    if !IR! == 0 echo KB%KB%else echo KB4512574



    :OA


    echo -------------- --------------

    echo %date% %time% -------------- Installing OA ActiveX control... --------------- >>%LOGFILE%2>&1


    md C:\%tempdir%\EcologyPlugin

    powershell -command"Expand-Archive C:\%tempdir%\win10-%BLD%\EcologyPlugin.zip C:\%tempdir%" >>%LOGFILE% 2>&1

    call C:\%tempdir%\EcologyPlugin\setup.bat >>%LOGFILE%2>&1

    if %ErrorLevel% == 0

    echo OA

    else

    echo OA



    echo %date% %time% -------------- Installing Edge Browser... --------------- >>%LOGFILE%2>&1

    rem allow side by sideold edge with new edge

    reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\EdgeUpdate /v Allowsxs /t REG_DWORD /d1 /f >>%LOGFILE%2>&1

    rem install without desktop shortcut

    reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\EdgeUpdate /v CreateDesktopShortcutDefault /t REG_DWORD /d0 /f >>%LOGFILE%2>&1


    C:\%tempdir%\win10-%BLD%\MicrosoftEdgeEnterprise%ARCH%.msi /quiet >>%LOGFILE%2>&1

    if %ErrorLevel% == 0

    echo Edge

    else

    echo Edge



    echo %date% %time% -------------- Applying Group Policy... --------------- >>%LOGFILE%2>&1


    C:\%tempdir%\win10-%BLD%\LGPO.exe /t C:\%tempdir%\win10-%BLD%\gp.txt >>%LOGFILE%2>&1

    if %ErrorLevel% == 0

    echo

    else

    echo



    rem see https://support.microsoft.com/en-sg/help/182569/internet-explorer-security-zones-registry-entries-for-advanced-users

    echo %date% %time% -------------- Update Internet Settings... --------------- >>%LOGFILE%2>&1

    reg import C:\%tempdir%\win10-%BLD%\isz1.reg >>%LOGFILE%2>&1

    if %ErrorLevel% == 0

    echo Internet

    else

    echo Internet



    rem hide first run see https://docs.microsoft.com/en-us/deployedge/microsoft-edge-policies#hidefirstrunexperience

    reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge -v HideFirstRunExperience /t REG_DWORD -d1 /f >>%LOGFILE%2>&1

    set /p secret= <C:\%tempdir%\secret.txt

    rem open verify page at next boot, note here we must use HKCU other than HKLM

    reg add HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v TestEdgeSetup /d"C:\Program Files x86\Microsoft\Edge\Application\msedge.exe%TRACKER%/v?secret=%secret%&newV=%verstr%" /f >>%LOGFILE% 2>&1

    reg query HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce /v TestEdgeSetup >>%LOGFILE%2>&1

    rem set new Edge as default browser

    powershell -c "new-object System.Net.WebClient.DownloadFile'%CDN%/SetDefaultBrowser.exe','C:\%tempdir%\SetDefaultBrowser.exe'" >>%LOGFILE% 2>&1

    C:\%tempdir%\SetDefaultBrowser.exe HKLM"Microsoft Edge"


    rem clear

    reg add HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce /v ClearEdgeSetup /d"cmd /C \"rd /Q /S C:\%tempdir%\"" /f >>%LOGFILE%2>&1


    rem if run sliently in background, there is no need to reboot, as we can keep seeding.

    rem shutdown /r /t 300



    according to this page version 1607 need at least KB4516061 installed. my batch script can install this patch with dism.exe, but windows will rollback it when applying update progress about to finish.


    found something in the cbs log :

    2020-09-02 11:24:50, Info CSI 00000ebc Loading installer DLL from explicit path: C:\Windows\WinSxS\amd64_microsoft-windows-s..ingstack-base-extra_31bf3856ad364e35_10.0.14393.3200_none_94b6fb091defb387\SupplementalServicingAI.dll 2020-09-02 11:24:50, Info CSI 00000ebd Performing 1 operations as follows: 0 LockComponentPath: flags: 0 comp: {l:16 b:1dd3109ed880d601d707000004058805} pathid: {l:16 b:1dd3109ed880d601d807000004058805} path: [l:120]'\SystemRoot\WinSxS\amd64_microsoft-client-li..pplementalservicing_31bf3856ad364e35_10.0.14393.3241_none_83ba3f31319948d2' pid: 504 starttime: 132434905070083922 2020-09-02 11:24:50, Info CSI 00000ebe Windows::WCP::SupplementalServicingAI::SupplementalServicing::Install. 2020-09-02 11:24:50, Info CSI 00000ebf Windows::WCP::SupplementalServicingAI::SupplementalServicing::Install Phase = 38 2020-09-02 11:24:50, Info CSI 00000ec0 Windows::WCP::SupplementalServicingAI::SupplementalServicing::IsAllowedSKU Checking if it's Allowed SKU 48. 2020-09-02 11:24:50, Info CSI 00000ec1 Windows::WCP::SupplementalServicingAI::SupplementalServicing::Install : SupplementalServicingFlag = 5. 2020-09-02 11:24:50, Info CSI 00000ec2 Windows::WCP::SupplementalServicingAI::SupplementalServicing::Install This machine is not eligible for supplemental servicing 2020-09-02 11:24:50, Info CSI 00000ec3 Performing 1 operations as follows: 0 LockComponentPath: flags: 0 comp: {l:16 b:1dd3109ed880d601d907000004058805} pathid: {l:16 b:1dd3109ed880d601da07000004058805} path: [l:115]'\SystemRoot\WinSxS\x86_microsoft.windows.s..ation.badcomponents_31bf3856ad364e35_10.0.14393.0_none_09e78f632173f4c5' pid: 504 starttime: 132434905070083922 2020-09-02 11:24:50, Error [0x018066] CSI 00000ec4 F Failed execution of queue item Installer: Supplemental Servicing AI installer {4e9a75dd-0792-460c-a238-3f4130c39369} with HRESULT HRESULT_FROM_WIN3250. Failure will not be ignored: A rollback will be initiated after all the operations in the installer queue are completed; installer is reliable[gle=0x80004005] 2020-09-02 11:24:50, Info CBS Added C:\Windows\Logs\CBS\CBS.log to WER report. 2020-09-02 11:24:50, Info CBS Could not get active session for current session file logging [HRESULT = 0x80004003 - E_POINTER] 2020-09-02 11:24:50, Info CBS Not able to add pending.xml.bad to Windows Error Report. [HRESULT = 0x80070002 - ERROR_FILE_NOT_FOUND] 2020-09-02 11:24:51, Info CBS Startup: Changing logon timeout to a static timeout: 10800000 2020-09-02 11:24:51, Info CBS Progress: UI message updated. Operation type: Update. Stage: 1 out of 1. Percent progress: 97. 2020-09-02 11:25:06, Info CSI 00000ec5 Creating NT transaction seq 2, objectname 'null' 2020-09-02 11:25:06, Info CSI 00000ec6 Created NT transaction seq 2 result 0x00000000, handle @0x3d8 2020-09-02 11:25:06, Info CSI 00000ec7@2020/9/2:03:25:06.185 Beginning NT transaction commit... 2020-09-02 11:25:06, Info CSI 00000ec8@2020/9/2:03:25:06.201 CSI perf trace: CSIPERF:TXCOMMIT;18518 2020-09-02 11:25:06, Info CSI 00000ec9@2020/9/2:03:25:06.201 CSI Advanced installer perf trace: CSIPERF:AIDONE;{4e9a75dd-0792-460c-a238-3f4130c39369};Microsoft-Client-Licensing-SupplementalServicing, version 10.0.14393.3241, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35};17354841us 2020-09-02 11:25:06, Info CSI 00000eca End executing advanced installer sequence 2490 Completion status: HRESULT_FROM_WIN32ERROR_ADVANCED_INSTALLER_FAILED





    please help!

    :)
     
    GuogangFan, Sep 2, 2020
    #1
  2. NdMk2o1o Win User

    1607: Unable to install installshield scripting runtime error - Win10

    Anyone had this error installing any old games? 1607: Unable to install installshield scripting runtime error

    The game is COD 2 and am running Windows 10 x64.... am sure I have installed this on a previous Windows 10 build, tried a quick google though it's throwing up a load of old threads related to Windows XP
     
    NdMk2o1o, Sep 2, 2020
    #2
  3. ShiBDiB Win User
    ShiBDiB, Sep 2, 2020
    #3
  4. Unable to install a patch on windows 10 1607

    windows xp installation and dual core am

    could someone please list the steps they follow to install windows with a dual core processor and windows xp service pack to. I'm reletively new to amd dual core and i feel i'm missing a step. All help will be appreciated. thanx
     
    exodusprime1337, Sep 2, 2020
    #4
Thema:

Unable to install a patch on windows 10 1607

Loading...
  1. Unable to install a patch on windows 10 1607 - Similar Threads - Unable install patch

  2. Wanna Cry Patch Windows 10 1607

    in Windows 10 Gaming
    Wanna Cry Patch Windows 10 1607: Hey everyone!Does anyone know what is the Wanna Cry Patch for Microsoft 10 OS Build 14393.0?Thanks https://answers.microsoft.com/en-us/windows/forum/all/wanna-cry-patch-windows-10-1607/df923b35-6dfc-4f47-b848-58513567bbb0
  3. Wanna Cry Patch Windows 10 1607

    in Windows 10 Software and Apps
    Wanna Cry Patch Windows 10 1607: Hey everyone!Does anyone know what is the Wanna Cry Patch for Microsoft 10 OS Build 14393.0?Thanks https://answers.microsoft.com/en-us/windows/forum/all/wanna-cry-patch-windows-10-1607/df923b35-6dfc-4f47-b848-58513567bbb0
  4. Wanna Cry Patch Windows 10 1607

    in Windows 10 Installation and Upgrade
    Wanna Cry Patch Windows 10 1607: Hey everyone!Does anyone know what is the Wanna Cry Patch for Microsoft 10 OS Build 14393.0?Thanks https://answers.microsoft.com/en-us/windows/forum/all/wanna-cry-patch-windows-10-1607/df923b35-6dfc-4f47-b848-58513567bbb0
  5. Some Window 11 patches are unable to install with an error Ox8007054f

    in Windows 10 Gaming
    Some Window 11 patches are unable to install with an error Ox8007054f: Some of Window 11 patches are unable to install with an error Ox8007054f . the computer system is Win 11 version 22h2 x64 * Moved from Community Center * Original title: correction to error Ox8007054f ?...
  6. Unable to install Windows 10 updates since 1607

    in Windows 10 Installation and Upgrade
    Unable to install Windows 10 updates since 1607: Hi I am currently running Windows 10 Home, version 1607 on my PC Acer Predator G3-605. I am also running Norton 360 antivirus. I noticed a while ago that my Windows updates were constantly failing and each time I would look into the error codes, attempt the usual fixes...
  7. Printer not working after Windows 10 1607 LTSB patch KB4525236 update

    in Windows 10 Drivers and Hardware
    Printer not working after Windows 10 1607 LTSB patch KB4525236 update: I have been happily printing since installing Windows 10 . I have seen issue after the following updates were installed :- Cumulative Update for Windows 10 Version 1607 for x64-based Systems (KB4525236 ) Can you please help ?...
  8. Window 10 Enterprise LTSB 1607 Patching

    in AntiVirus, Firewalls and System Security
    Window 10 Enterprise LTSB 1607 Patching: Dear everyone, I had Window 10 iso with Enterprise version of 1607 build 14393.447 iso. I would like to install latest "security" patches only to my windows. Had installed latest SSU (KB4509091) for 1607. When I am installed latest security patches...
  9. Install latest windows 10 from 1607

    in AntiVirus, Firewalls and System Security
    Install latest windows 10 from 1607: Before you ask I have all updated drivers, disabled every boot with windows and uninstalled my current antivirus and using windows defender. So no steam, apple or anything else running during install... Doing this to use more advanced ar system only. O.k. Its not my first...
  10. Unable to reinstall windows store Windows 10 1607

    in Microsoft Windows 10 Store
    Unable to reinstall windows store Windows 10 1607: My Apps cache is empty (deleted) C:\Program Files\WindowsApps\Deleted but all the original packages are still there in: C:\Users\Frank\AppData\Local\Packages\Microsoft.WindowsStore_8wekyb3d8bbwe I can Get-AppxPackage with an Elevated PowerShell command and get a long...