1

All I'm trying to do is get Windows to switch to a different Wallpaper folder at night (a folder containing night images). To achieve this I'm planning to use Task Scheduler to run .bat files which simply switch the names of the two folders around. That's pretty straight-forward.

The only problem is that Windows won't let me rename the folder containing the current Wallpaper image. This means I have to temporarily change the current wallpaper image to something else while I'm renaming the folders.

And to do this I need some kind of file to modify the registry key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\Wallpaper

I did find a script someone had written which I think does this, but it's too technical for me to understand. I don't know anything about the C language, what classes and namespaces are, or how to create a file that runs this code in Windows. Also, it seems like a lot of code just to change the value of a single registry key. And would I have to install software?

Perhaps someone could give me some help?

Also, could anyone confirm that the Windows wallpaper folder is not kept in the registry? If it was, I could simply change this, and wouldn't have to rename folders. But I've done a lot of searching and can't find any trace of it in the registry.

2

goto Computer\HKEY_CURRENT_USER\Control Panel\Desktop add new string value named "Wallpaper" and set it's value to the full path of the image.

  • Thank you but I don't believe this helps me to change the wallpaper using Task Scheduler, which is what I'm trying to do. – L J Mar 6 at 13:47
0

@zebanovich's answer is correct in that HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper is generally the key used to update the Desktop wallpaper.

Windows doesn't have a specific folder for wallpapers. You can set any file path you want in that registry key. Try this batch command:

reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d "C:\Folder\File.jpg" /f

Replace C:\Folder\File.jpg with the full path to the file you want to set the wallpaper to. You can run this directly from the command line to give it a try. If it does what you want, then create one batch file for day and one for night, then add two tasks in the task scheduler to match.

If this answer doesn't work for you, please update your question with more information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.