Jump to content


Popular Content

Showing content with the highest reputation on 02/05/2020 in all areas

  1. Here is the script I wrote for direct-integration of KB2533552 into your Windows 7 install: @echo off set KB2533552=%1 :: Figure out where the mounted Windows install is: ::====================================================================== :step1 for /F "tokens=* USEBACKQ" %%F IN (`dism /get-mountedwiminfo | find "Mount Dir"`) DO (SET line=%%F) set "MOUNT_DIR=%line:* : =%" :: Extract the %temp%\KB2533552 package and patch it for DISM: ::====================================================================== :step2 mkdir "%temp%\KB2533552" expand -F:* "%KB2533552%" "%temp%\KB2533552"\ mkdir "%temp%\KB2533552\Unpacked" expand -F:* "%temp%\KB2533552\Windows6.1-KB2533552-x64.cab" "%temp%\KB2533552\Unpacked"\ copy "%temp%\KB2533552\Unpacked\update.mum" "%temp%\KB2533552\Unpacked\update.mum.bak" :: Use VBS to replace specific text inside of the "update.mum" file: ::====================================================================== :step3 echo Const ForReading = 1 > ""%temp%\replace.vbs"" echo Const ForWriting = 2 >> "%temp%\replace.vbs" echo. >> "%temp%\replace.vbs" echo strFileName = Wscript.Arguments(0) >> "%temp%\replace.vbs" echo strOldText = "exclusive=" + chr(34) + "true" + chr(34) +" allowedOffline=" + chr(34) + "false" + chr(34) >> "%temp%\replace.vbs" echo strNewText = "exclusive=" + chr(34) + "false" + chr(34) +" allowedOffline=" + chr(34) + "true" + chr(34) >> "%temp%\replace.vbs" echo. >> "%temp%\replace.vbs" echo Set objFSO = CreateObject("Scripting.FileSystemObject") >> "%temp%\replace.vbs" echo Set objFile = objFSO.OpenTextFile(strFileName, ForReading) >> "%temp%\replace.vbs" echo strText = objFile.ReadAll >> "%temp%\replace.vbs" echo objFile.Close >> "%temp%\replace.vbs" echo. >> "%temp%\replace.vbs" echo strNewText = Replace(strText, strOldText, strNewText) >> "%temp%\replace.vbs" echo Set objFile = objFSO.OpenTextFile(strFileName, ForWriting) >> "%temp%\replace.vbs" echo objFile.Write strNewText 'WriteLine adds extra CR/LF >> "%temp%\replace.vbs" echo objFile.Close >> "%temp%\replace.vbs" cscript "%temp%\replace.vbs" "%temp%\KB2533552\Unpacked\update.mum" :: Integrate the patched version of %temp%\KB2533552 into Windows install: ::====================================================================== :step4 dism /Add-Package /Image:"%MOUNT_DIR%" /PackagePath:"%temp%\KB2533552\Unpacked" :: Now we need overwrite the modified "update.mum" with the original, so :: that KB2533552 doesn't show up under Windows Update anymore.... ::====================================================================== :step5 set SRC="%temp%\KB2533552\"Original\update.mum.bak set DST=%MOUNT_DIR%\Windows\servicing\Packages\Package_for_KB2533552~31bf3856ad364e35~amd64~~ takeown /F "%DST%" /A icacls "%DST%" /grant Administrators:F copy "%SRC%" "%DST%" icacls "%DST%" /setowner "NT SERVICE\TrustedInstaller" icacls "%DST%" /grant:r Administrators:RX In order to use this script, you must invoke the script with the filename of the KB2533552 MSU file you are trying to integrate as a parameter to the script. If it is not in the current directory (or calling direct from the Start Menu), you must also include the path to the MSU file. Once KB2533552 is installed, KB3046269 can be easily installed using DISM (or WinToolkit). The next patch, KB3177467, requires a bit more work to properly integrate, as described here (titled Issues After Integrating KB3177467): So I found this solution (titled KB3177467 Offline Integration Problem and Solution ), which requires the setacl tool (which can be downloaded from helgeklein.com). Other versions may be available, however, I'm not sure where they might be.... But you must integrate KB3177467 first before executing these commands: reg load HKLM\TempSoftware %MOUNT_DIR%\windows\system32\config\Software setacl -on "HKLM\TempSoftware\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending" -ot reg -actn setowner -ownr n:Administrators setacl -on "HKLM\TempSoftware\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending" -ot reg -actn ace -ace n:Administrators;p:full reg add "HKLM\TempSoftware\Microsoft\Windows\CurrentVersion\Component Based Servicing\SessionsPending" /v Exclusive /t REG_DWORD /d 0 /f reg unload HKLM\TempSoftware Obviously you have to replace %MOUNT_DIR% with your mount path. Hope this helps somebody! Let me know if it doesn't work for you and I'll try to fix it! Install_KB2533552.cmd
    1 point
  • Create New...