Update 01/19/2015: Added link to powershell script for Bing Wallpaper download
In a recent project a customer asked to change the default Web Access background. Not just to a static image by replacing the default image, but the customer wanted the background to reflect the current Bing wallpaper, since the Bing wallpaper changes every day.
After explaining that this might be a legal issue, and the customer must contact the Bing team and his legal department to confirm that we are allowed to do this, I started doing some research.
All legal things aside (and I take no responsibility whatsoever), here’s my solution.
On a side note, I’m installing / configuring everything on the RD Web Access server itself. You can use any other server, but you need to configure some things differently if you choose not to install it on the RD Web Access server, but I leave that to you.
After installation browse to the installation folder and open “settings.conf”.
setter = win
setter = no
output_folder = C:\Users\Administrator\MyBingWallpapers
output_folder = C:\Windows\Web\RDWeb\Pages\images
Note that you can also set Proxy settings here if need be.
Save your changes.
Now, when running the tool’s executable it will output a file named “wallpaper.jpg”. Since the Bing wallpaper changes once a day, we need to run the tool at least once a day to meet the customer’s goal.
Create a Scheduled task using Task Scheduler (under Administrative Tools) for this.
Run whether user is logged on or not (always run). Run with highest privileges (we need to be able to write the “wallpaper.jpg”). In this example I run the task in the Domain Administrator context. Remember this is not best practice. Instead create a user for this purpose and assign it just the right amount of rights to run this task.
Of course we want a program to run. Browse to the PyBingWallpaper installation folder and select “BingWallpaper-cli.exe”. This is the commandline tool that gets the Bing wallpaper and stores it as “wallpaper.jpg” in the location you specified in “settings.conf” earlier.
Now we need to tell RD Web Access to use “wallpaper.jpg”.
As always, backup the files in %windir%\Web\RDWeb\Pages, just in case..
Open tswa.css from C:\Windows\Web\RDWeb\Pages\en-US in an editor.
Replace line 27 with the following code:
And just before line 31 insert the following code:
And that’s it.
Voila, automated Bing Wallpaper in RD Web Access.
Again, still not sure if it’s legal to use the Bing Wallpapers this way, but it works.
Colleague Michael Verbeek posted a solution for downloading the current Bing Wallpaper using Powershell.
You can check his article and his solution here.
Until next time,