This commit is contained in:
dragonflylee 2019-05-02 19:47:41 +08:00
parent 9d7cfa0c2e
commit 80f012baea
4 changed files with 33 additions and 7 deletions

View File

@ -1,5 +1,5 @@
;混合现实 ;混合现实
;Holographic Holographic
;快速助手 ;快速助手
QuickAssist QuickAssist
;Windows Media Player 播放器 ;Windows Media Player 播放器

View File

@ -0,0 +1,13 @@
;混合现实服务
Microsoft-Windows-Not-Supported-On-LTSB-Package
Microsoft-Windows-Not-Supported-On-LTSB-WOW64-Package
;快速助手
Microsoft-Windows-QuickAssist-Package
;离线文件
Microsoft-Windows-OfflineFiles-Package
Microsoft-Windows-OfflineFiles-WOW64-Package
;连接
Microsoft-Windows-Non-LTSB-RegulatedPackages-Package
;Edge浏览器
;Microsoft-Windows-Internet-Browser-Package
OpenSSH-Client-Package

View File

@ -9,7 +9,7 @@
<HelpCustomized>true</HelpCustomized> <HelpCustomized>true</HelpCustomized>
</OEMInformation> </OEMInformation>
<RegisteredOrganization>Lenovo</RegisteredOrganization> <RegisteredOrganization>Lenovo</RegisteredOrganization>
<ComputerName>Yoga730</ComputerName> <ComputerName></ComputerName>
</component> </component>
</settings> </settings>
<settings pass="oobeSystem"> <settings pass="oobeSystem">

View File

@ -72,9 +72,9 @@ goto :eof
rem 处理原版镜像 [ %~1 : 镜像挂载路径 ] rem 处理原版镜像 [ %~1 : 镜像挂载路径 ]
:MakeWimClean :MakeWimClean
call :RemoveAppx "%~1" call :RemoveAppx "%~1"
for /f %%f in ('type "%~dp0Pack\CapabilityList.%ImageShortVersion%.txt" 2^>nul') do call :RemoveCapability "%~1", "%%f"
for /f %%f in ('type "%~dp0Pack\RemoveList.%ImageVersion%.txt" 2^>nul') do call :RemoveComponent "%~1", "%%f"
call :IntRollupFix "%~1" call :IntRollupFix "%~1"
for /f %%f in ('type "%~dp0Pack\FeatureList.%ImageShortVersion%.txt" 2^>nul') do call :RemoveCapability "%~1", "%%f"
for /f %%f in ('type "%~dp0Pack\RemoveList.%ImageVersion%.txt" 2^>nul') do call :RemoveComponent "%~1", "%%f"
call :AddAppx "%~1", "DesktopAppInstaller", "VCLibs.14" call :AddAppx "%~1", "DesktopAppInstaller", "VCLibs.14"
call :AddAppx "%~1", "Store", "VCLibs.14 Runtime.1.7 Framework.1.7" call :AddAppx "%~1", "Store", "VCLibs.14 Runtime.1.7 Framework.1.7"
call :AddAppx "%~1", "WindowsCalculator" call :AddAppx "%~1", "WindowsCalculator"
@ -94,12 +94,18 @@ rem
call :GetImageInfo "%~1", "%~2" call :GetImageInfo "%~1", "%~2"
title 正在处理 [%~2] 镜像 %ImageName% 版本 %ImageVersion% 语言 %ImageLanguage% title 正在处理 [%~2] 镜像 %ImageName% 版本 %ImageVersion% 语言 %ImageLanguage%
%Dism% /Mount-Wim /WimFile:"%~1" /Index:%~2 /MountDir:"%MNT%" %Dism% /Mount-Wim /WimFile:"%~1" /Index:%~2 /MountDir:"%MNT%"
call :RemoveAppx "%MNT%"
for /f %%f in ('type "%~dp0Pack\FeatureList.%ImageShortVersion%.txt" 2^>nul') do call ::RemoveCapability "%MNT%", "%%f"
for /f %%f in ('type "%~dp0Pack\RemoveList.%ImageVersion%.txt" 2^>nul') do call :RemoveComponent "%MNT%", "%%f"
call :IntRollupFix "%MNT%"
call :AddAppx "%MNT%", "DesktopAppInstaller", "VCLibs.14"
call :AddAppx "%MNT%", "Store", "VCLibs.14 Runtime.1.7 Framework.1.7"
call :AddAppx "%MNT%", "WacomTechnologyCorp", "UWPDesktop" call :AddAppx "%MNT%", "WacomTechnologyCorp", "UWPDesktop"
call :ImportOptimize "%MNT%"
call :ImportUnattend "%MNT%", "OEM" call :ImportUnattend "%MNT%", "OEM"
if exist "%~dp0Driver" %Dism% /Image:"%MNT%" /Add-Driver /Driver:"%~dp0Driver" /recurse /ForceUnsigned if exist "%~dp0Driver" %Dism% /Image:"%MNT%" /Add-Driver /Driver:"%~dp0Driver" /recurse /ForceUnsigned
call :ImageClean "%MNT%" call :ImageClean "%MNT%"
%Dism% /Commit-Image /MountDir:"%MNT%" /Append %Dism% /Unmount-Wim /MountDir:"%MNT%" /Commit
%Dism% /Unmount-Wim /MountDir:"%MNT%" /Discard
goto :eof goto :eof
rem 处理lopatkin镜像 [ %~1 : 镜像挂载路径 ] rem 处理lopatkin镜像 [ %~1 : 镜像挂载路径 ]
@ -158,7 +164,6 @@ if not exist "%~1\Windows\WinSxS\pending.xml" (
%NSudo% cmd.exe /c rd /s /q "%~1\Windows\WinSxS\Temp\TransformerRollbackData" %NSudo% cmd.exe /c rd /s /q "%~1\Windows\WinSxS\Temp\TransformerRollbackData"
%NSudo% cmd.exe /c rd /s /q "%~1\Windows\CbsTemp" %NSudo% cmd.exe /c rd /s /q "%~1\Windows\CbsTemp"
) )
call :IntFeature "%~1", "NetFx3"
endlocal endlocal
goto :eof goto :eof
@ -306,6 +311,14 @@ for /f %%i in ('"dir /b %Apps%\*%~2*.appxbundle" 2^>nul') do (
endlocal endlocal
goto :eof goto :eof
rem 禁用功能 [ %~1 : 镜像挂载路径, %~2 : 功能名称 ]
:RemoveFeature
for /f "tokens=4" %%f in ('%Dism% /English /Image:"%~1" /Get-Features ^| findstr Feature ^| findstr /i "%~2"') do (
echo.移除功能 [%%f]
%Dism% /Image:"%~1" /Disable-Feature /FeatureName:"%%f" /Remove
)
goto :eof
rem 移除自带应用 [ %~1 : 镜像挂载路径 ] rem 移除自带应用 [ %~1 : 镜像挂载路径 ]
:RemoveAppx :RemoveAppx
for /f "tokens=3" %%f in ('%Dism% /English /Image:"%~1" /Get-ProvisionedAppxPackages ^| findstr PackageName') do ( for /f "tokens=3" %%f in ('%Dism% /English /Image:"%~1" /Get-ProvisionedAppxPackages ^| findstr PackageName') do (