Want to change your desktop background from a script instead of digging through Settings?
Windows has an API call for exactly that. Set Window Wallpaper is a small AutoHotkey v2 script that uses it.
Point it at a picture, run it, and that picture is your wallpaper. 😊

One API Call Sets the Background
The script calls Windows’ SystemParametersInfo function with the “set desktop wallpaper” action. No Settings window, no right-clicking the desktop.
It also saves the change to your Windows profile, so the new wallpaper is still there after you restart.
Point It at Your Picture
Near the bottom of the script is one line with the path to the picture. I point mine at our YouTube channel art.
- Picture found: it becomes your wallpaper and the script exits
- Picture not found: a file picker opens so you can choose a JPG, PNG or BMP
- Cancel the picker: nothing changes, your current wallpaper stays
Change the path once and the picker never shows up again.
Ways to Use It
- Before a recording or screen share: switch to a clean, branded background
- On a hotkey: copy the one DllCall line into your own script and bind it to a key
- Several copies: make one per picture and run whichever one fits the moment
What’s in the Download
- SetWindowWallpaper.ahk: the AutoHotkey v2 script
- lib\ScriptObject.ahk: our standard helper library that the script includes
Get Set Window Wallpaper
Set Window Wallpaper is $4.99. You get the full source to change however you like.
Small script, and a good one to learn DllCall from. ⚡
Joe

