Disassembler0 / Win10-Initial-Setup-Script

PowerShell script for automation of routine tasks done after fresh installations of Windows 10 / Server 2016 / Server 2019
MIT License
4.7k stars 1.08k forks source link

Add wallPaper #235

Closed vince50 closed 5 years ago

vince50 commented 5 years ago

it is possible to add a line to put a wallpaper on the desktop?

Disassembler0 commented 5 years ago

You can create a custom tweak with path to your preferred wallpaper. Something like

Function SetWallpaper() {
    Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\" -Name "Wallpaper" -Type String -Value "X:\Some\Image.png"
    rundll32.exe user32.dll, UpdatePerUserSystemParameters
}

Check Advanced usage in FAQ to see how to work with custom tweaks and presets.