add system config

This commit is contained in:
Julian Freeman
2025-12-06 12:47:24 -04:00
parent e58df80181
commit f883583b3e
4 changed files with 19570 additions and 33 deletions

View File

@@ -108,5 +108,22 @@
"Path": "./config/adobe_acrobat.reg" "Path": "./config/adobe_acrobat.reg"
} }
] ]
},
{
"Name": "System Optimize",
"Id": "System.Config",
"Version": "",
"Enabled": 1,
"PostInstall": [
{
"Type": "RegImport",
"Path": "./config/sys_optimize.reg"
},
{
"Type": "FileCopy",
"Source": "./assets/hosts",
"Destination": "$env:SystemRoot\\System32\\drivers\\etc\\hosts"
}
]
} }
] ]

19475
assets/hosts Normal file

File diff suppressed because it is too large Load Diff

40
config/sys_optimize.reg Normal file
View File

@@ -0,0 +1,40 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel]
; 桌面显示此电脑0=显示
"{20D04FE0-3AEA-1069-A2D8-08002B30309D}"=dword:00000000
; 桌面显示控制面板0=显示
"{5399E694-6CE5-4D6C-8FCE-1D8870FDCBA0}"=dword:00000000
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search]
; 仅搜索图标
"SearchboxTaskbarMode"=dword:00000001
; === 1. 设置“更多固定项”布局 (Win11) ===
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Start_Layout"=dword:00000001
; === 2. 关闭“显示最近添加的应用” (通过策略禁用) ===
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Explorer]
"HideRecentlyAddedApps"=dword:00000001
; === 3. 关闭“显示最常用的应用” ===
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Start_TrackProgs"=dword:00000000
; === 4. 关闭“在开始菜单中显示推荐的文件/跳转列表” ===
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Start_TrackDocs"=dword:00000000
; === 5. 关闭“显示提示、应用促销等建议” ===
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager]
"SubscribedContent-338388Enabled"=dword:00000000
; === 6. 关闭“显示与帐户相关的通知” (Win11 新特性) ===
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Start_AccountNotifications"=dword:00000000
; === 微软拼音输入法设置 ===
[HKEY_CURRENT_USER\Software\Microsoft\InputMethod\Settings\CHS]
; 关闭“尝试必应的文本建议” (也就是云候选项/Web文本建议)
"EnableCloudCandidate"=dword:00000000

View File

@@ -31,6 +31,10 @@ foreach ($app in $apps) {
Write-Host "Installing: $($app.Name)" -ForegroundColor Yellow Write-Host "Installing: $($app.Name)" -ForegroundColor Yellow
Write-Host "==========================================" Write-Host "=========================================="
if ($app.Id -eq "System.Config") {
# 如果是纯配置项,直接打印跳过信息
Write-Host "[System Config] Skipping install..." -ForegroundColor Magenta
} else {
# --- 步骤 A: Winget 安装 --- # --- 步骤 A: Winget 安装 ---
$wingetArgs = @( $wingetArgs = @(
"install", "install",
@@ -68,6 +72,7 @@ foreach ($app in $apps) {
Write-Error "[Fail] Error code: $($proc.ExitCode)" Write-Error "[Fail] Error code: $($proc.ExitCode)"
continue # 安装失败则跳过后续配置 continue # 安装失败则跳过后续配置
} }
}
# --- 步骤 B: PostInstall 配置 --- # --- 步骤 B: PostInstall 配置 ---
if ($app.PostInstall -and $app.PostInstall.Count -gt 0) { if ($app.PostInstall -and $app.PostInstall.Count -gt 0) {