Skip to content

Instantly share code, notes, and snippets.

@eliashussary
Created February 16, 2018 15:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save eliashussary/7f87d1e2b1a9b7ea0bc5fcdeee6cfccc to your computer and use it in GitHub Desktop.
Save eliashussary/7f87d1e2b1a9b7ea0bc5fcdeee6cfccc to your computer and use it in GitHub Desktop.
A simple batch script to change your windows wallpaper. It takes a single argument, the path of your desired wallpaper.
echo off
:: Handle CLI Args
IF [%1]==[] (
echo No wallpaper path provided, please provide a full qualified path. Ex: C:\dir1\dir2\wallpaper.jpg
exit /b 1
)
:: Commands
echo Changing wallpaper to: %1
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d %1 /f
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
@nin0-dev
Copy link

nin0-dev commented Oct 8, 2021

THANKS

@nin0-dev
Copy link

nin0-dev commented Oct 8, 2021

i needed it to make my rundll32 user32.dll,UpdatePerUserSystemParameters VIRUS

@andreapx
Copy link

It seems to be working only with BMP images, not JPG/PNG

@AndreiVoicea2
Copy link

it dosen't work , it makes my screen black

@UnKevined
Copy link

even with a bmp file, the batch does not run on windows 11. Can someone possibly give me a tip here?

@SuchyChomik
Copy link

This WORKS! You just need to restart/log off and log back on

@Mister-Curious
Copy link

Doesn't do anything

@iamjahid
Copy link

works but one time not random 7 days if i want

@brenowd
Copy link

brenowd commented Mar 27, 2024

It seems to be working only with BMP images, not JPG/PNG

i am make test, run sucess extensio PNG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment