:: Integrate the patched version of %temp%\KB2533552 into Windows install:ĭism /Add-Package /Image:"%MOUNT_DIR%" /PackagePath:"%temp%\KB2533552\Unpacked" ![]() :: Use VBS to replace specific text inside of the "update.mum" file:Įcho Const ForReading = 1 > ""%temp%\replace.vbs""Įcho Const ForWriting = 2 > "%temp%\replace.vbs"Įcho strFileName = Wscript.Arguments(0) > "%temp%\replace.vbs"Įcho strOldText = "exclusive=" chr(34) "true" chr(34) " allowedOffline=" chr(34) "false" chr(34) > "%temp%\replace.vbs"Įcho strNewText = "exclusive=" chr(34) "false" chr(34) " allowedOffline=" chr(34) "true" chr(34) > "%temp%\replace.vbs"Įcho Set objFSO = CreateObject("Scripting.FileSystemObject") > "%temp%\replace.vbs"Įcho Set objFile = objFSO.OpenTextFile(strFileName, ForReading) > "%temp%\replace.vbs"Įcho strText = objFile.ReadAll > "%temp%\replace.vbs"Įcho objFile.Close > "%temp%\replace.vbs"Įcho strNewText = Replace(strText, strOldText, strNewText) > "%temp%\replace.vbs"Įcho Set objFile = objFSO.OpenTextFile(strFileName, ForWriting) > "%temp%\replace.vbs"Įcho objFile.Write strNewText 'WriteLine adds extra CR/LF > "%temp%\replace.vbs"Ĭscript "%temp%\replace.vbs" "%temp%\KB2533552\Unpacked\update.mum" ::=įor /F "tokens=* USEBACKQ" %%F IN (`dism /get-mountedwiminfo | find "Mount Dir"`) DO (SET line=%%F) :: Figure out where the mounted Windows install is: ![]() ![]() Here is the script I wrote for direct-integration of KB2533552 into your Windows 7 off
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |