Compare commits

...

3 Commits

Author SHA1 Message Date
Julian Freeman
11cfa1e823 change json to ini 2026-02-04 13:02:00 -04:00
Julian Freeman
8270fa3ec1 add teams icon, add vs revo, etc 2026-02-04 12:51:35 -04:00
Julian Freeman
406317db78 support individual selection 2026-02-04 12:12:21 -04:00
6 changed files with 146 additions and 1 deletions

Binary file not shown.

View File

@@ -52,7 +52,13 @@
"Id": "Microsoft.Teams", "Id": "Microsoft.Teams",
"Version": "", "Version": "",
"Enabled": 1, "Enabled": 1,
"PostInstall": [] "PostInstall": [
{
"Type": "FileCopy",
"Source": "./assets/msteams/Microsoft Teams.lnk",
"Destination": "$HOME\\Desktop\\Microsoft Teams.lnk"
}
]
}, },
{ {
"Name": "KeePassXC", "Name": "KeePassXC",
@@ -69,6 +75,10 @@
"Type": "FileCopy", "Type": "FileCopy",
"Source": "./assets/keepassxc/KeePassXC.lnk", "Source": "./assets/keepassxc/KeePassXC.lnk",
"Destination": "$HOME\\Desktop\\KeePassXC.lnk" "Destination": "$HOME\\Desktop\\KeePassXC.lnk"
},
{
"Type": "RegImport",
"Path": "./config/keepassxc.reg"
} }
] ]
}, },
@@ -119,6 +129,18 @@
} }
] ]
}, },
{
"Name": "Revo Uninstaller",
"Id": "RevoUninstaller.RevoUninstaller",
"Version": "2.6.5",
"Enabled": 0,
"PostInstall": [
{
"Type": "RegImport",
"Path": "./config/revo_uninstaller.reg"
}
]
},
{ {
"Name": "Adobe Acrobat Reader", "Name": "Adobe Acrobat Reader",
"Id": "Adobe.Acrobat.Reader.64-bit", "Id": "Adobe.Acrobat.Reader.64-bit",

View File

@@ -20,6 +20,40 @@ Write-Host "Reading configurations..." -ForegroundColor Cyan
# 使用 UTF8 读取防止中文乱码 # 使用 UTF8 读取防止中文乱码
$apps = Get-Content $jsonPath -Encoding UTF8 | ConvertFrom-Json $apps = Get-Content $jsonPath -Encoding UTF8 | ConvertFrom-Json
# === 2.1 加载外部开关配置 (selection.ini) ===
# 尝试查找根目录下的 selection.ini (位于 bin 的上一级)
$selectionPath = Join-Path (Split-Path $PSScriptRoot -Parent) "selection.ini"
if (Test-Path $selectionPath) {
Write-Host "Loading selection overrides from selection.ini..." -ForegroundColor Cyan
try {
# 读取所有行,过滤掉注释和空行
$iniLines = Get-Content $selectionPath -Encoding UTF8 | Where-Object { $_ -match "=" -and $_ -notmatch "^;" -and $_ -notmatch "^\[" }
# 创建一个哈希表来存储 INI 配置
$selectionConfig = @{}
foreach ($line in $iniLines) {
# 按第一个等号分割,限制分割次数为 2
$parts = $line -split '=', 2
if ($parts.Count -eq 2) {
$key = $parts[0].Trim()
$value = $parts[1].Trim()
$selectionConfig[$key] = $value
}
}
# 应用配置
foreach ($app in $apps) {
if ($selectionConfig.ContainsKey($app.Name)) {
# 转换为整数 1 或 0
$app.Enabled = [int]$selectionConfig[$app.Name]
}
}
} catch {
Write-Warning "Error reading selection.ini: $_"
}
}
# === 3. 主循环 === # === 3. 主循环 ===
foreach ($app in $apps) { foreach ($app in $apps) {
if ($app.Enabled -ne 1) { if ($app.Enabled -ne 1) {

5
config/keepassxc.reg Normal file
View File

@@ -0,0 +1,5 @@
Windows Registry Editor Version 5.00
; disable automatically start
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"KeePassXC"=-

View File

@@ -0,0 +1,72 @@
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\General]
"AU on startup"=dword:00000000
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\Uninstaller]
"Create System Restore Pont"=dword:00000000
"Maximize uninstall wizard"=dword:00000000
"Select leftovers by default"=dword:00000001
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\TrackCleaner\Browsers\CHR]
"Clear History of Visited Internet Web Pages"=dword:00000001
"Delete Temporary Internet Files"=dword:00000001
"Delete Cookies"=dword:00000000
"Delete Download History"=dword:00000001
"Delete Form History"=dword:00000001
"Delete Session History"=dword:00000001
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\TrackCleaner\Browsers\EDGE]
"Clear History of Visited Internet Web Pages"=dword:00000001
"Delete Temporary Internet Files"=dword:00000001
"Delete Cookies"=dword:00000000
"Delete Download History"=dword:00000001
"Delete Form History"=dword:00000001
"Delete Session History"=dword:00000001
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\TrackCleaner\Browsers\FF]
"Clear History of Visited Internet Web Pages"=dword:00000001
"Delete Temporary Internet Files"=dword:00000001
"Delete Cookies"=dword:00000001
"Delete Download History"=dword:00000001
"Delete Form History"=dword:00000001
"Delete Session History"=dword:00000001
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\TrackCleaner\Browsers\IE]
"Clear History of Visited Internet Web Pages"=dword:00000001
"Delete Address Bar History"=dword:00000001
"Delete Temporary Internet Files"=dword:00000001
"Delete Cookies"=dword:00000001
"Delete Index.dat files"=dword:00000001
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\TrackCleaner\Browsers\Opera]
"Clear History of Visited Internet Web Pages"=dword:00000001
"Delete Download History"=dword:00000001
"Delete Temporary Internet Files"=dword:00000001
"Delete Cookies"=dword:00000001
"Delete Session History"=dword:00000001
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\TrackCleaner\MSOffice]
"CWRDH"=dword:00000001
"CERDH"=dword:00000001
"CARDH"=dword:00000001
"CPPRDH"=dword:00000001
"CFPEDH"=dword:00000001
[HKEY_CURRENT_USER\Software\VS Revo Group\Revo Uninstaller\TrackCleaner\Windows]
"Clear Recent Documents History"=dword:00000001
"Clear Start Menu Run History"=dword:00000001
"Clear Find File History"=dword:00000001
"Clear Printers, Computers and People Find History"=dword:00000001
"Clear Paint Recent File History"=dword:00000001
"Clear Wordpad Recent File History"=dword:00000001
"Clear Regedit Last Opened Key History"=dword:00000001
"Clear Common Dialog Open Save Recent History"=dword:00000001
"Clear Common Dialog Last Visited Folder History"=dword:00000001
"Delete Start Menu Click Logs"=dword:00000001
"Empty Clipboard"=dword:00000001
"Empty Recycle Bin"=dword:00000001
"Delete Windows Temporary Files"=dword:00000001
"Delete Memory Dump Files"=dword:00000001
"Delete Chkdsk recovered file fragments"=dword:00000001
"Delete Thumbnail Cache"=dword:00000001

12
selection.ini Normal file
View File

@@ -0,0 +1,12 @@
[Apps]
7-Zip=1
Google Chrome=1
OpenOffice=1
Microsoft Teams=1
KeePassXC=1
VeraCrypt=1
File Shredder=1
VLC=1
Revo Uninstaller=1
Adobe Acrobat Reader=0
System Optimize=1