Change wallpaper with a batch file to close the program. Possible?

I am trying to create a batch file that will change my background when the program closes in Windows 7. I tried to use this, but it will not work even when I log out and log in:

@echo off reg /add HKCU\Control Panel\Desktop\WallPaper /v wallpaper /t REG_SZ /dc:\images\wallpaper.bmp 
+6
windows-7 background batch-file wallpaper
15 Oct 2018-11-17T00:
source share
1 answer

There are some errors in your team:

  • You have added the noecessarry / to add command.
  • You do not include the registry key name in quotation marks (for a space).
  • You specified the wrong path ( WallPaper at the end).

This should do the trick:

 reg add "HKCU\Control Panel\Desktop" /v Wallpaper /f /t REG_SZ /dc:\images\wallpaper.bmp 

Of course, if there are spaces in the wallpaper path, you must also enclose it in quotation marks.

I also added the /f switch to force overwrite if the wallpaper is already installed.

+15
Oct 16 '11 at 10:00
source share



All Articles