Untitled
unknown
plain_text
5 months ago
733 B
3
Indexable
# Define the path to the wallpaper image $wallpaperPath = "C:\path\to\your\wallpaper.jpg" # Check if the file exists if (Test-Path $wallpaperPath) { # Set the registry keys for the wallpaper Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\" -Name Wallpaper -Value $wallpaperPath Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\" -Name WallpaperStyle -Value 2 # 2 = Stretch Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\" -Name TileWallpaper -Value 0 # 0 = No tiling # Notify the system about the wallpaper change rundll32.exe user32.dll, UpdatePerUserSystemParameters Write-Host "Wallpaper changed successfully!" } else { Write-Host "Wallpaper file not found at $wallpaperPath" }
Editor is loading...
Leave a Comment