diff --git a/assets/fileshredder/File Shredder.lnk b/assets/fileshredder/File Shredder.lnk new file mode 100644 index 0000000..cb0e06f Binary files /dev/null and b/assets/fileshredder/File Shredder.lnk differ diff --git a/assets/keepassxc/KeePassXC.lnk b/assets/keepassxc/KeePassXC.lnk new file mode 100644 index 0000000..46e3bc6 Binary files /dev/null and b/assets/keepassxc/KeePassXC.lnk differ diff --git a/apps.json b/bin/apps.json similarity index 91% rename from apps.json rename to bin/apps.json index 286b1ad..76c904e 100644 --- a/apps.json +++ b/bin/apps.json @@ -64,6 +64,11 @@ "Type": "FileCopy", "Source": "./assets/keepassxc/keepassxc.ini", "Destination": "$env:APPDATA\\KeePassXC\\keepassxc.ini" + }, + { + "Type": "FileCopy", + "Source": "./assets/keepassxc/KeePassXC.lnk", + "Destination": "$HOME\\Desktop\\KeePassXC.lnk" } ] }, @@ -89,6 +94,11 @@ { "Type": "RegImport", "Path": "./config/fileshredder.reg" + }, + { + "Type": "FileCopy", + "Source": "./assets/fileshredder/File Shredder.lnk", + "Destination": "$HOME\\Desktop\\File Shredder.lnk" } ] }, diff --git a/main.ps1 b/bin/main.ps1 similarity index 92% rename from main.ps1 rename to bin/main.ps1 index 55f8db6..ff80dfb 100644 --- a/main.ps1 +++ b/bin/main.ps1 @@ -4,8 +4,8 @@ $ErrorActionPreference = "Stop" # === 1. 加载依赖库 === # 确保 lib 目录存在 -if (-not (Test-Path "$PSScriptRoot\lib")) { - Write-Error "Cannot find ./lib, some files missing." +if (-not (Test-Path "$PSScriptRoot\..\lib")) { + Write-Error "Cannot find .\lib, some files missing." exit 1 } @@ -92,20 +92,20 @@ foreach ($app in $apps) { # 1. 复制文件 "FileCopy" { - & "$PSScriptRoot\lib\invoke-filecopy.ps1" ` + & "$PSScriptRoot\..\lib\invoke-filecopy.ps1" ` -Source $action.Source ` -Destination $action.Destination } # 2. 导入注册表 "RegImport" { - & "$PSScriptRoot\lib\invoke-regimport.ps1" ` + & "$PSScriptRoot\..\lib\invoke-regimport.ps1" ` -Path $action.Path } # 3. 执行 CMD "Command" { - & "$PSScriptRoot\lib\invoke-cmdexec.ps1" ` + & "$PSScriptRoot\..\lib\invoke-cmdexec.ps1" ` -Command $action.Command ` -WorkDir $action.WorkDir } diff --git a/config/sys_optimize.reg b/config/sys_optimize.reg index 18483b2..2af8a78 100644 --- a/config/sys_optimize.reg +++ b/config/sys_optimize.reg @@ -29,6 +29,9 @@ Windows Registry Editor Version 5.00 ; 关闭“尝试必应的文本建议” (也就是云候选项/Web文本建议) "EnableCloudCandidate"=dword:00000000 +; === 开启桌面图标排列 === +;[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Bags\1\Desktop] +;"FFlags"=dword:40200225 ; 关闭 IPv6 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters] diff --git a/install.bat b/install.bat index 6b99e98..481252f 100644 --- a/install.bat +++ b/install.bat @@ -23,4 +23,4 @@ echo Calling main.ps1... :: -ExecutionPolicy Bypass: 绕过默认的脚本执行策略限制 :: -File: 指定要运行的脚本文件 -powershell.exe -NoExit -NoProfile -ExecutionPolicy Bypass -File ".\main.ps1" +powershell.exe -NoExit -NoProfile -ExecutionPolicy Bypass -File ".\bin\main.ps1"