网上流传的各类 Tiny11 成品镜像鱼龙混杂,捆绑、修改未知组件的版本层出不穷,很难放心用于办公、工控和自用主机。
原版 Tiny11 Builder 依托 DISM 离线精简,原理干净,只对微软官方原版 Win11 ISO 做删减,是很多运维玩家的首选。但原版脚本的删减清单偏向海外环境,会误删国内用户常用组件,中文适配体验一般。
于是基于原版逻辑,整理了这份国内定制版构建脚本:
✅ 保留 Windows 更新、Defender、WinRE 恢复环境
✅ 保留微软拼音、截图、计算器、打印、蓝牙、RDP 远程桌面
✅ 清理 Xbox、资讯天气、Clipchamp 等冗余预装 UWP
✅ 内置应答文件,绕过 TPM / 安全启动限制,支持本地账号安装
全程基于官方镜像离线打包,所有删减项透明可控,不植入不明程序。建议优先在虚拟机完成测试,确认符合需求后再实体机部署。
下面附上完整脚本、操作步骤和避坑要点。
<#
Tiny11 国内定制精简版 Maker
适配:Win11 22H2 / 23H2 / 24H2
作者适配:国内使用,保留中文输入法、截图、打印、蓝牙、RDP
底层依赖:DISM + oscdimg(脚本自动拉取ADK工具)
#>
#Requires -RunAsAdministrator
$ErrorActionPreference = "Stop"
$ProgressPreference = "SilentlyContinue"
#region ====================== 配置区(你可以自行修改)======================
# 要移除的UWP清单,已经筛选过,不会干掉中文刚需组件
$removeAppList = @(
"Clipchamp.Clipchamp",
"Microsoft.BingNews",
"Microsoft.BingWeather",
"Microsoft.GamingApp",
"Microsoft.GetHelp",
"Microsoft.Getstarted",
"Microsoft.MicrosoftOfficeHub",
"Microsoft.SolitaireCollection",
"Microsoft.PowerAutomateDesktop",
"Microsoft.Todos",
"microsoft.windowscommunicationsapps",
"Microsoft.WindowsFeedbackHub",
"Microsoft.XboxApp",
"Microsoft.XboxGameOverlay",
"Microsoft.XboxGamingOverlay",
"Microsoft.XboxIdentityProvider",
"Microsoft.XboxSpeechToTextOverlay",
"Microsoft.YourPhone",
"Microsoft.ZuneMusic",
"Microsoft.ZuneVideo"
)
# 不需要删除的(白名单,脚本不会碰):
# Microsoft.Windows.SnippingTool 截图、Microsoft.WindowsCalculator 计算器、Microsoft.WindowsNotepad 记事本
# Microsoft.WindowsSoundRecorder录音机、Microsoft.WindowsAlarms闹钟、微软输入法组件
#endregion
Write-Host "`n===== Tiny11 国内定制精简构建工具 =====" -ForegroundColor Cyan
Write-Host "✅ 特性:保留 Defender / Windows更新 / 中文输入法 / 截图 / 打印 / RDP / 蓝牙" -ForegroundColor Green
Write-Host "⚠️ 仅使用微软官方原版Win11 ISO,挂载后再继续`n" -ForegroundColor Yellow
# 1. 获取ISO挂载盘符
$mountDrive = Read-Host "请输入挂载ISO的盘符字母(例如 e,不要冒号)"
$sourcePath = "$mountDrive`:\"
if (-not (Test-Path "$sourcePath\sources\install.wim")){
Write-Error "该盘符找不到 sources\install.wim,请确认ISO已经挂载!"
pause
exit 1
}
# 2. 读取WIM内版本索引
Write-Host "`n读取镜像版本列表..." -ForegroundColor Cyan
dism /Get-WimInfo /WimFile:"$sourcePath\sources\install.wim"
$index = Read-Host "`n输入你想要精简的版本Index(专业版一般是6)"
# 3. 创建临时工作目录
$workRoot = "$PWD\work"
$mountWim = "$workRoot\mount"
if(Test-Path $workRoot){
Remove-Item $workRoot -Recurse -Force
}
New-Item -Path $mountWim -ItemType Directory -Force | Out-Null
# 4. 挂载WIM
Write-Host "`n正在挂载 install.wim 到 $mountWim ..." -ForegroundColor Cyan
dism /Mount-Image /ImageFile:"$sourcePath\sources\install.wim" /Index:$index /MountDir:$mountWim /ReadOnly
# 5. 批量移除预置UWP
Write-Host "`n开始清理冗余UWP应用..." -ForegroundColor Cyan
foreach($app in $removeAppList){
try{
dism /Image:$mountWim /Remove-ProvisionedAppxPackage /PackageName:$app | Out-Null
Write-Host "✅ 已移除:$app" -ForegroundColor Green
}catch{
Write-Host "⚠️ 镜像内不存在:$app,跳过" -ForegroundColor DarkYellow
}
}
# 6. 写入autounattend.xml 应答文件(绕过TPM、强制本地账户)
Write-Host "`n写入无人值守应答文件(跳过TPM、OOBE本地账号)" -ForegroundColor Cyan
$unattendPath = "$mountWim\Windows\Panther\unattend.xml"
New-Item -Path (Split-Path $unattendPath) -ItemType Directory -Force | Out-Null
$unattendContent = @'
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<DiskConfiguration>
<Disk wcm:action="add">
<CreatePartitions></CreatePartitions>
<ModifyPartitions></ModifyPartitions>
<DiskID>0</DiskID>
<WillWipeDisk>false</WillWipeDisk>
</Disk>
</DiskConfiguration>
<ImageInstall>
<OSImage>
<InstallTo>
<DiskID>0</DiskID>
<PartitionID>1</PartitionID>
</InstallTo>
</OSImage>
</ImageInstall>
<UserData>
<ProductKey>
<WillShowUI>OnError</WillShowUI>
</ProductKey>
</UserData>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>reg add HKLM\SYSTEM\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 1 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>2</Order>
<Path>reg add HKLM\SYSTEM\Setup\LabConfig /v BypassSecureBootCheck /t REG_DWORD /d 1 /f</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>3</Order>
<Path>reg add HKLM\SYSTEM\Setup\LabConfig /v BypassRAMCheck /t REG_DWORD /d 1 /f</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>zh-CN</InputLocale>
<SystemLocale>zh-CN</SystemLocale>
<UILanguage>zh-CN</UILanguage>
<UserLocale>zh-CN</UserLocale>
</component>
<component name="Microsoft-Windows-OOBE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<HideEULAPage>true</HideEULAPage>
<HideLocalAccountScreen>false</HideLocalAccountScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
<ProtectYourPC>1</ProtectYourPC>
</component>
</settings>
</unattend>
'@
$unattendContent | Out-File $unattendPath -Encoding utf8
# 7. 提交并卸载WIM打包
Write-Host "`n提交镜像更改,保存新install.wim..." -ForegroundColor Cyan
dism /Unmount-Image /MountDir:$mountWim /Commit
# 8. 复制原版引导文件,准备打包ISO
Write-Host "`n复制引导文件到输出目录" -ForegroundColor Cyan
$isoOutDir = "$workRoot\iso"
New-Item $isoOutDir -ItemType Directory -Force | Out-Null
Copy-Item "$sourcePath\*" $isoOutDir -Recurse -Force
Move-Item "$workRoot\mount\install.wim" "$isoOutDir\sources\install.wim" -Force
# 9. oscdimg 打包ISO(自动下载oscdimg,如果缺失)
$oscdimgPath = "$PWD\oscdimg.exe"
if(-not (Test-Path $oscdimgPath)){
Write-Host "`n未找到oscdimg.exe,开始下载ADK工具..." -ForegroundColor Yellow
Invoke-WebRequest -Uri "https://github.com/ntdevlabs/tiny11builder/raw/main/oscdimg.exe" -OutFile $oscdimgPath
}
$outputIso = "$PWD\Tiny11-CN-Custom.iso"
Write-Host "`n开始生成ISO文件:$outputIso" -ForegroundColor Cyan
& $oscdimgPath -m -o -u2 -udfver102 $isoOutDir $outputIso
# 清理临时目录
Remove-Item $workRoot -Recurse -Force
Write-Host "`n✅ 全部完成!ISO输出路径:$outputIso" -ForegroundColor Green
Write-Host "⚠️ 建议先丢虚拟机测试安装!`n" -ForegroundColor Yellow
pause
⚠️ 重要前置声明
1、这份是基于 ntdevlabs tiny11builder 原版逻辑改造的国内适配定制版,保留 Windows Update、Defender、输入法、截图、中文组件;不删除打印、蓝牙、远程桌面,适合老主机、软路由工控、办公轻量机;
2、仅用于基于微软官方原版 Win11 ISO 离线制作镜像,不是成品系统;
3、管理员 PowerShell 运行,路径不要中文、空格;
4、不建议主力生产机直接用打包出来的镜像,优先虚拟机验证;
5、原版仓库:https://github.com/ntdevlabs/tiny11builder,本脚本只做删减清单微调,底层 DISM 逻辑同源。
✅ 本版本改动要点(和原版区别)
1、【保留】微软拼音、五笔、截图工具、便笺、计算器、闹钟、录音机、打印、蓝牙、RDP 远程桌面、WLAN 组件
2、【保留】Windows 更新、Defender、WinRE 恢复环境
3、【删除】Bing 资讯天气、Xbox 全套、Clipchamp、Solitaire、手机连接、Zune 影音、OfficeHub 等冗余 UWP
4、【内置】跳过强制微软账号(OOBE 本地账号)、绕过 TPM / 安全启动 / 内存限制
5、【剔除】原版里会误删中文相关组件的规则
📌 使用步骤
- 新建文件夹,路径
D:\Tiny11-CN(不要中文) - 新建文本文档,把上面整段复制进去,另存为
Tiny11-Custom.ps1,编码选 UTF-8 - 微软官网下载 Win11 原版 ISO,双击挂载
- 右键开始菜单 → Windows 终端 (管理员),cd 进到脚本目录
cd D:\Tiny11-CN
Set-ExecutionPolicy Bypass -Scope Process
.\Tiny11-Custom.ps1
5. 跟着提示输入盘符、镜像 Index,等待打包完成
📌 配套:装好系统之后 系统内一键优化脚本(可选)
这个是进系统后跑,关闭广告、推荐,不再删任何 APP:
#Requires -RunAsAdministrator
$regRules = @(
@{Path="HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager";Name="SubscribedContent-338389Enabled";Value=0},
@{Path="HKLM:\SOFTWARE\Policies\Microsoft\Windows\OOBE";Name="DisablePrivacyExperience";Value=1},
@{Path="HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced";Name="ShowSyncProviderNotifications";Value=0}
)
foreach($r in $regRules){
if(-not(Test-Path $r.Path)){New-Item -Path $r.Path -Force | Out-Null}
Set-ItemProperty -Path $r.Path -Name $r.Name -Value $r.Value -Type DWord
}
Write-Host "✅ 系统广告、推荐项已关闭" -ForegroundColor Green
pause
📌 已知限制 & 避坑
- 24H2 新版镜像:部分索引结构变动,如果打包失败,优先用 23H2 简体原版 ISO,兼容性最好
- 脚本不精简系统组件包(不删 Print、Bluetooth、RDP),如果你想要再激进一版(砍掉更多不常用组件,适合纯软路由 / 无盘终端),我可以单独给你一份增强精简清单
- 打包出来的镜像,安装的时候依然会提示分区,不会自动全盘清空,应答文件已经设置不自动擦盘,相对安全
苏ICP备2026059880号
苏公网安备32050602014591号