A small PowerShell tool for the long-running Windows bug where the desktop background goes blank after idle, sleep, or Spotlight cache failure.
It does what the other GitHub wallpaper apps do, plus Spotlight harvesting:
- Copy Windows Spotlight images out of hidden caches into real
.jpgfiles. - Mix those with your own picture folder.
- Set the desktop to a local Picture (not live Spotlight).
- Re-apply that picture on a timer and when the PC wakes from sleep.
Windows can keep downloading Spotlight in the background. This tool just stops trusting Explorer to keep the wallpaper painted.
| Project | Idea we reused |
|---|---|
| Windows_Wallpaper_Changer | SystemParametersInfo to set a file from a folder on a timer |
| WallpaperSlideshow | Keep running after Explorer restart / monitor changes |
| Spotlight extractors | Scan ContentDeliveryManager + IrisService caches, keep only real large images |
Native Spotlight on the desktop is the fragile part. Native Spotlight on the lock screen can stay on so Windows still downloads new photos.
- Create a folder for your own pictures, e.g.
C:\Wallpapers. - Edit
config.json:
{
"Mode": "Both",
"OwnPicsFolder": "C:\\Wallpapers",
"LibraryFolder": "%USERPROFILE%\\Pictures\\StayWallpaper-Spotlight",
"IntervalMinutes": 30,
"Fit": "Fill"
}Mode:
OwnPics— only your folderSpotlight— only harvested Spotlight imagesBoth— mix them
- Double-click
Install.bat. - In Settings → Personalization → Background, leave it on Picture. StayWallpaper will overwrite the picture file as needed. Lock screen can stay on Windows Spotlight.
StayWallpaper-Apply— every N minutes and at logonStayWallpaper-Wake— System event Power-Troubleshooter ID 1 (resume from sleep)StayWallpaper-Harvest— copy new Spotlight files every 6 hours
Files land in %LOCALAPPDATA%\StayWallpaper\.
powershell -ExecutionPolicy Bypass -File StayWallpaper.ps1 -Action Harvest
powershell -ExecutionPolicy Bypass -File StayWallpaper.ps1 -Action Apply
powershell -ExecutionPolicy Bypass -File StayWallpaper.ps1 -Action Restore
powershell -ExecutionPolicy Bypass -File StayWallpaper.ps1 -Action Status
powershell -ExecutionPolicy Bypass -File StayWallpaper.ps1 -Action UninstallNext.bat jumps to another image now.
Copy the StayWallpaper folder to each PC, edit config.json, run Install.bat.
No admin required.
Run Uninstall.bat. Harvested pictures stay in LibraryFolder unless you delete them.