Windows Desktop Background Rotator is a Powershell script for Windows that loads a wallpaper from a pool whenever it is run.
Windows itself ships with options to rotate backgrounds regularly, but the options are somewhat limited in this regard. While you can configure the operating system to rotate a pool of images as desktop backgrounds, there is no option to further customize the selection.
Say you would like to use different wallpapers for different times of the year. Can be done, but you need to adjust the pool of wallpaper images manually each time, or switch to different themes for that.
There are plenty of programs out there to change wallpapers. To name a few: Bgcall, Jellybean, WallPapa, Color Desker, Wallperizer, and Wally.
One of the main ideas of Windows Desktop Background Rotator is to use different pools of background images based on time periods.
You can configure the script to load a pool of background images for Christmas, Summer, Halloween, or any other time period or day you like.
The script has an advantage over dedicated programs for the job, as it runs only for as long as it needs to change the wallpaper on the desktop. Once done, it does not use any system resources anymore which is better obviously than a resident program that needs to run all the time even though it may change the background only once a day or even less frequently than that.
Downside is that you need to configure the script using an editor. It is not too difficult, but if you never came into contact with scripts before, it may be overwhelming.
Let me walk you through the steps of doing that:
First thing you do is download the script from the project's GitHub page. Note that it downloads with the .txt extension automatically which you need to remove either when the download prompt appears, or later on the system.
The Powershell script uses the folder Desktop Backgrounds within Pictures by default. You can keep it at that, and move your wallpapers there, or edit the path in the script. The function Get-Default-Pool sets the path there.
My suggestion is to keep the default path, as it makes things easier. It is easy enough to copy your wallpaper images to the folder, or folders under the structure.
The next step depends on whether you want to use different pools of wallpaper images that the program loads depending on the date. If you don't skip the following step.
Add folders to the main Desktop Backgrounds folder, e.g. Christmas, Birthday, Halloween and so on, and place your wallpaper images there.
A typical folder structure could look like this:
You need to add the following function to the script.
Function Get-StarWars-Pool {
Get-ChildItem "$([Environment]::GetFolderPath(`"MyPictures`"))\Desktop Backgrounds\Starwars"
}
Make sure you replace "Starwars" with the folder name that you are using on your system. Place the new function below the Get-Default-Pool function so that it looks like this
Function Get-Default-Pool {
Get-ChildItem "$([Environment]::GetFolderPath(`"MyPictures`"))\Desktop Backgrounds" -Recurse | Where-Object {! $_.PSIsContainer -And $_.FullName -NotMatch "Starwars"}
}
Function Get-StarWars-Pool {
Get-ChildItem "$([Environment]::GetFolderPath(`"MyPictures`"))\Desktop Backgrounds\Starwars"
}
Add | Where-Object {! $_.PSIsContainer -And $_.FullName -NotMatch "Starwars" to the default function to block it from selecting backgrounds from the date-based folders. Change Starwars to the pool name that you have set.
Locate the $Dates array, and add start and end date information to it.
$Dates = @(
@{
"StartDate" = "2-01"
"EndDate" = "2-28"
"Pool" = "Starwars"
})
This would pull background images from the Starwars folder from February 1 to February 28. Repeat this step for any other wallpaper pool that you have added to the script.
Two date pools would look like this:
$Dates = @(
@{
"StartDate" = "2-01"
"EndDate" = "2-28"
"Pool" = "Starwars"
}
@{
"StartDate" = "12-01"
"EndDate" = "12-26"
"Pool" = "Christmas"
})
The script uses stretch automatically when it comes to loading wallpapers. If you think that is fine, skip this step. If you want another value instead, do the following:
Locate [Wallpaper.Setter]::SetWallpaper($ImageToUse.FullName, 2) near the end of the script, and change the 2 to another value.
I suggest you run the script to check if it works correctly. This can be done by right-clicking the edited Powershell script and selecting run with PowerShell from the context menu.
If you don't get an error, e.g. nothing happens, you may use it manually, or, set up a scheduled task instead to automate the process.
To create a new scheduled task, do the following:
Windows will run the script from now on based on the parameters that you have defined.
Setup of the script is not overly complicated, but it is not as easy as using a user interface to set up wallpaper pools. The main advantage the script offers is that it runs only when it changes wallpaper images on your desktop, and that you can define time-based periods in which custom wallpaper pools are used.
Now Read: The best wallpaper downloaders for Windows
There are no comments on this post yet, be the first one to share your thoughts!
Please click on the following link to open the newsletter signup page: Ghacks Newsletter Sign up
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.
Leave a Reply