更新清理优化

This commit is contained in:
dragonflylee 2019-04-18 17:44:42 +08:00
parent c7bb7a3f95
commit cf4a90246d
2 changed files with 16 additions and 10 deletions

View File

@ -1 +1 @@
<License xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="1211e654-7c08-4a4a-a3da-bf2326ca4567" LicenseID="0528780b-bdf9-265c-89a0-31d5b764f3ce" ContentID="8b713aef-296e-d9cc-a4cd-55c277109014" Version="3" xmlns="urn:schemas-microsoft-com:windows:store:licensing:ls"><Binding Binding_Type="Machine"><ProductID>9MVLWT5DMSKR</ProductID><PFM>wacomtechnologycorp.157535b83c264_ss941bf8mfs8a</PFM><LicenseInstanceID>9fe3a8a9-bd5b-47f1-b249-456256af9f4a</LicenseInstanceID><RequestorID>ad4052ce-a3e8-85f2-d923-3e86b7f1d380</RequestorID><LeaseRequired>False</LeaseRequired></Binding><LicenseInfo Type="Full" LicenseUsage="Offline" LicenseCategory="OEM"><IssuedDate>2018-02-20T16:19:16.6697237Z</IssuedDate><LastUpdateDate>2018-02-20T16:19:16.4341951Z</LastUpdateDate><BeginDate>2018-02-20T16:19:16.4341951Z</BeginDate></LicenseInfo><SPLicenseBlock>FAAAAMgAAADJAAAACgAAAAMAAQCFSoxaAgDLAAAAEAAAAAt4KAX5vVwmiaAx1bdk887OAAAAYAAAAHcAYQBjAG8AbQB0AGUAYwBoAG4AbwBsAG8AZwB5AGMAbwByAHAALgAxADUANwA1ADMANQBiADgAMwBjADIANgA0AF8AcwBzADkANAAxAGIAZgA4AG0AZgBzADgAYQAAAM0AAAAiAAAAAQD6KSOapiQJxxD2nmFeRcxtabvoLJlKGITH+KijNpkbzCAAAAAEAAAAhEqMWswAAABEAAAAAQACAOnXp5v4m0Up2sUghQegvxX8yoWSMd7nUZ+Zj5yI0ubUT+UtclI5V2rczwmV7jhutpzVtFfTVubo5VyUXe7RzHQ=</SPLicenseBlock><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /><DigestValue>8jkJyyE/rM7jDZhrtVG0BV+k7Bkd2LR23qxzGe8jefg=</DigestValue></Reference></SignedInfo><SignatureValue>U3k6AmXpdY6hh2jirHLCcfIycw/hFf0a0oXpykd8cRlN7Mx25o1CCVudGqNdB6FsOYjboMIrev+Nhzv1inOpLSRQ4j4WiGjJMNPR8BYI7Qba6wIdDVOWC2c4mC5D2u7zysNkKYVGN/A59LwlRDBwCcxlpOTqUBLcuqTtcIJDHBmWazyrAgwr0PYMrXMPB48+IdtSl1NkGdppYI59ZsIRiSPu7yN5n0az3cazWOHp3wnvPUdRZigNCYDn1jONAWwVa3mG/AZMs08eCO+fCSNJeO8eQWKLwU/re+9HpttIiHQuYTiQJjsEbfgnOshKbtzbAph9hEMM52VlR3DZJLUH9g==</SignatureValue><KeyInfo Id="_0f81b24f-bc40-2712-0d5d-e7c10085c330"><KeyValue><RSAKeyValue><Modulus>oVSJXItDsaAIfwyR9bhh/ZSppCAO+in9POLWdC2/TQodgeHZzbdBvxJvKhpbrq6ZP0FsSElLwRoLAmv7zIuVw3Vb7tfQt5bjCDHRAG9fesNlYKV3ybyNrHyzglfZPRB5UJZw32yi03zQa+LLa05fjs6joEmlHc5BrGQrGrbNMBahz4cmuxKC4/dhEb7JZFUkc0MRhs/M3Ve511HQfKuG+92g1OffJdRsAPzWRdskPoN35knnqno7F85OBmGV/LNBgdtDWUH6di1eUCQFeKGfMp+Q/LFUX9jawTTEPn72tYbpYASug05Skcg6KTHlcLGzevxGw7BYsOsqfDka5n0YGw==</Modulus><Exponent>AAEAAQ==</Exponent></RSAKeyValue></KeyValue></KeyInfo></Signature></License>
<License xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="b3615f65-be0f-4928-82f3-5f97fdb52bc3" LicenseID="0528780b-bdf9-265c-89a0-31d5b764f3ce" ContentID="8b713aef-296e-d9cc-a4cd-55c277109014" Version="3" xmlns="urn:schemas-microsoft-com:windows:store:licensing:ls"><Binding Binding_Type="Machine"><ProductID>9MVLWT5DMSKR</ProductID><PFM>wacomtechnologycorp.157535b83c264_ss941bf8mfs8a</PFM><LicenseInstanceID>225fb6ff-e4e6-4ad5-85b8-002c03bdcc27</LicenseInstanceID><RequestorID>ad4052ce-a3e8-85f2-d923-3e86b7f1d380</RequestorID><LeaseRequired>False</LeaseRequired></Binding><LicenseInfo Type="Full" LicenseUsage="Offline" LicenseCategory="OEM"><IssuedDate>2019-03-28T21:46:02.6915651Z</IssuedDate><LastUpdateDate>2019-03-28T21:46:02.6916939Z</LastUpdateDate><BeginDate>2019-03-28T21:46:02.6916939Z</BeginDate></LicenseInfo><SPLicenseBlock>FAAAAMgAAADJAAAACgAAAAMAAQCbQJ1cAgDLAAAAEAAAAAt4KAX5vVwmiaAx1bdk887OAAAAYAAAAHcAYQBjAG8AbQB0AGUAYwBoAG4AbwBsAG8AZwB5AGMAbwByAHAALgAxADUANwA1ADMANQBiADgAMwBjADIANgA0AF8AcwBzADkANAAxAGIAZgA4AG0AZgBzADgAYQAAAM0AAAAiAAAAAQD6KSOapiQJxxD2nmFeRcxtabvoLJlKGITH+KijNpkbzCAAAAAEAAAAm0CdXMwAAABEAAAAAQACAOyj5/N9hw7NNfO9ZyCnHmHb9R8MTiPxE8iVclZwyDDbH4fj4inAbeeN27flHWGJxp9XAz86Tv6VIAv/qEiefFg=</SPLicenseBlock><Signature xmlns="http://www.w3.org/2000/09/xmldsig#"><SignedInfo><CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /><SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" /><Reference URI=""><Transforms><Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature" /></Transforms><DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256" /><DigestValue>3GaSYpVQdQ16W96BOltvb4AFHGVpZhRlUXvUN62vBlQ=</DigestValue></Reference></SignedInfo><SignatureValue>WbAsEKTijcEk+SXxYut3/T77nzzO0XRYggS8ck0hGl20/u0vzf0OhO8AiOQw8AOhc5lSSe+ZzYvrJsnnlgBjjSKqkVy8ck80g9nwBtCKJM5RO/l+NBpFAloyAe25xUzH2XDsYeKSh1Z1jkmXB/ik9vqEjEvLZOT5FS0i1VfMU9tHtmcEqTsJgggtTZXBiIh/rcNje8oytyNnm0oHO9mxW4to0TtmoAFUCrSNzHX39Er5raNhcmxY9OexOFH+gY8zUJDGcWvAhyYczAmJplAd7VPhvgOBjaI+VZxZ12aOhl3a3UxZAQvYLL91arLr5uJjDXNhAoSalzBvQSkUGOKnXQ==</SignatureValue><KeyInfo Id="_0f81b24f-bc40-2712-0d5d-e7c10085c330"><KeyValue><RSAKeyValue><Modulus>oVSJXItDsaAIfwyR9bhh/ZSppCAO+in9POLWdC2/TQodgeHZzbdBvxJvKhpbrq6ZP0FsSElLwRoLAmv7zIuVw3Vb7tfQt5bjCDHRAG9fesNlYKV3ybyNrHyzglfZPRB5UJZw32yi03zQa+LLa05fjs6joEmlHc5BrGQrGrbNMBahz4cmuxKC4/dhEb7JZFUkc0MRhs/M3Ve511HQfKuG+92g1OffJdRsAPzWRdskPoN35knnqno7F85OBmGV/LNBgdtDWUH6di1eUCQFeKGfMp+Q/LFUX9jawTTEPn72tYbpYASug05Skcg6KTHlcLGzevxGw7BYsOsqfDka5n0YGw==</Modulus><Exponent>AAEAAQ==</Exponent></RSAKeyValue></KeyValue></KeyInfo></Signature></License>

View File

@ -94,7 +94,7 @@ rem
call :GetImageInfo "%~1", "%~2"
title 正在处理 [%~2] 镜像 %ImageName% 版本 %ImageVersion% 语言 %ImageLanguage%
%Dism% /Mount-Wim /WimFile:"%~1" /Index:%~2 /MountDir:"%MNT%"
call :AddAppx "%MNT%", "WacomTechnologyCorp", "VCLibs.14 Runtime.1.4 Framework.1.3"
call :AddAppx "%MNT%", "WacomTechnologyCorp", "UWPDesktop"
call :ImportUnattend "%MNT%", "OEM"
if exist "%~dp0Driver" %Dism% /Image:"%MNT%" /Add-Driver /Driver:"%~dp0Driver" /recurse /ForceUnsigned
call :ImageClean "%MNT%"
@ -136,24 +136,30 @@ rem ############################################################################
rem 集成积累更新 [ %~1 : 镜像挂载路径 ]
:IntRollupFix
setlocal
call :MountImageRegistry "%~1"
rem Enable DISM Image Cleanup with Full ResetBase...
Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "DisableResetbase" /t REG_DWORD /d "0" /f >nul
call :UnMountImageRegistry
set "UpdatePath=%~dp0Pack\Update\%ImageVersion%.%ImageArch%"
if exist "%UpdatePath%" (
%Dism% /Image:"%~1" /Add-Package /ScratchDir:"%TMP%" /PackagePath:"%UpdatePath%"
rem %Dism% /Image:"%~1" /Cleanup-Image /ScratchDir:"%TMP%" /StartComponentCleanup /ResetBase
)
call :IntFeature "%~1", "NetFx3"
set "RollupPath=%~dp0Pack\RollupFix\%ImageVersion%.%ImageArch%"
if exist "%RollupPath%" (
%Dism% /Image:"%~1" /Add-Package /ScratchDir:"%TMP%" /PackagePath:"%RollupPath%"
call :IntRecovery "%~1", "%RollupPath%"
)
if not exist "%~1\Windows\WinSxS\pending.xml" (
rem Enable DISM Image Cleanup with Full ResetBase...
call :MountImageRegistry "%~1"
Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "DisableResetbase" /t REG_DWORD /d "0" /f >nul
Reg add "HKLM\TK_SOFTWARE\Microsoft\Windows\CurrentVersion\SideBySide\Configuration" /v "SupersededActions" /t REG_DWORD /d "1" /f >nul
call :UnMountImageRegistry
%Dism% /Image:"%~1" /Cleanup-Image /ScratchDir:"%TMP%" /StartComponentCleanup
) else (
%NSudo% cmd.exe /c del /q "%~1\Windows\WinSxS\ManifestCache\*.bin"
%NSudo% cmd.exe /c rd /s /q "%~1\Windows\WinSxS\Temp\PendingDeletes"
%NSudo% cmd.exe /c rd /s /q "%~1\Windows\WinSxS\Temp\TransformerRollbackData"
%NSudo% cmd.exe /c rd /s /q "%~1\Windows\CbsTemp"
)
call :IntFeature "%~1", "NetFx3"
endlocal
%NSudo% cmd.exe /c rd /s /q "%~1\Windows\WinSxS\Temp\PendingDeletes"
%NSudo% cmd.exe /c rd /s /q "%~1\Windows\WinSxS\ManifestCache"
goto :eof
rem 向 WinRe 集成更新 [ %~1 : 镜像挂载路径, %~2 更新包路径 ]