Add new wallpaper image (Wallpaper.png) to the project

This commit is contained in:
2026-05-17 22:16:10 +08:00
parent 264560b4e3
commit fec3d77a08
4 changed files with 23 additions and 1 deletions

View File

@@ -133,6 +133,24 @@ foreach ($entry in $entries) {
}
}
# Wallpaper and Lock Screen
Write-Host "Setting desktop wallpaper and lock screen..."
$wallpaperDest = "C:\Windows\Web\Wallpaper\Custom"
New-Item -Path $wallpaperDest -ItemType Directory -Force | Out-Null
Copy-Item -Path "$scriptDir\wallpaper\Wallpaper.png" -Destination "$wallpaperDest\Wallpaper.png" -Force
Copy-Item -Path "$scriptDir\wallpaper\Lockscreen.png" -Destination "$wallpaperDest\Lockscreen.png" -Force
Add-Type -TypeDefinition @"
using System.Runtime.InteropServices;
public class Wallpaper {
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni);
}
"@
[Wallpaper]::SystemParametersInfo(0x0014, 0, "$wallpaperDest\Wallpaper.png", 3) | Out-Null
Write-Host "Desktop wallpaper and lock screen configured."
# ShareX - Remove "Capture Entire Screen" shortcut
Write-Host "Configuring ShareX shortcuts..."