How to change the wallpaper in batch

Virtu-all_Gamer -  
 bob -
Hi,
I've been working on a batch file for something fun, and
I would like to change the wallpaper. I've looked at some forums, but I never understand. So, I would like to know the script to change the wallpaper in batch. Thanks ;) and bye.

1 réponse

barnabe0057 Posted messages 14431 Registration date   Status Contributeur Last intervention   4 929
 
Hello,

reg add "HKCU\Control Panel\Desktop" /v Wallpaper /d "C:\Path\to\the\image.bmp" /F

RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True


"Artificial intelligence is defined as the opposite of natural stupidity."
13
Merlode
 
Hello,
I put your code in a blank bat file and it shows a black color instead of the image I previously requested.
I specify that I am on Windows 10, and the code is as follows:

reg add "HKCU\Control Panel\Desktop" /v Wallpaper /d "C:\Users\Clement\Music\Blind test\Fond_d'écran_TV.png" /F

RUNDLL32.EXE USER32.DLL,UpdatePerUserSystemParameters ,1 ,True

    
0
bob > Merlode
 
The file must be a .bmp and not a .png ...
2