OutLawTorn Posted September 7, 2011 Posted September 7, 2011 Staff have just asked us to have ~5 different wallpapers for students each with a different message on it... Currently the wallpaper is pushed out via group policy. Is there any way of creating a policy that will randomly load one of the five wallpapers for each user that logs in? Or does anyone know of any other ways of achieving the same result? They are happy to have one wallpaper for a fortnight and then change it in the policy manually, but it would be nice to make it a bit flashier for them
SYNACK Posted September 7, 2011 Posted September 7, 2011 A two part solution, a machine startup script that copies all five wallpapers to the c:\walpapers folder. A scheduled task on the machines that triggers at logoff and runs the a script that randomly copies one of the five wallpapers from the c:\wallpapers to a set location c:\walpaper.bmp on the machine this way it gets around any local permissions issues. Then point the GPO to the location on the machine (c:\walpaper.bmp) at the end of each week you could change the avalible wallpapers on the network share and have the machine startup script to copy them out to the clients c:.
p858snake Posted September 7, 2011 Posted September 7, 2011 BGInfo as a login script could possibly do this (But don't quote me on this)
glennda Posted September 7, 2011 Posted September 7, 2011 Create an HTML file and store it on a server share - in the html use some javascript which randomly selects an image
ricki Posted September 7, 2011 Posted September 7, 2011 You could create a script that will create a random number say 1 to 5 and they depending on what number it picks it runs a different bginfo script. Richard
ricki Posted September 7, 2011 Posted September 7, 2011 This page might help you create a script FREE JavaSCRIPT - create random number generator function, method to calculate between values Richard
gshaw Posted September 7, 2011 Posted September 7, 2011 You could create a script that will create a random number say 1 to 5 and they depending on what number it picks it runs a different bginfo script. Richard I'd go with that route, means you can also have a custom message with the wallpaper that you can edit easily as you go along. The other thing I do with BGInfo is to use a VBScript to call the right file based on the machine's screen resolution... means no nasty stretched backgrounds
OutLawTorn Posted October 28, 2011 Author Posted October 28, 2011 Got it working using the following VBS script, which generates a random number between 1 and 5, and assigns a different BGInfo profile accordingly. Posting for reference Dim myRandom, maxNumber Set WShell = CreateObject("WScript.Shell") Randomize MaxNumber = 5 MinNumber = 1 myRandom = Int((Rnd*(MaxNumber))+MinNumber) Select Case myRandom Case 1: myWallpaperConfig = "1.bgi" Case 2: myWallpaperConfig = "2.bgi" Case 3: myWallpaperConfig = "3.bgi" Case 4: myWallpaperConfig = "4.bgi" Case 5: myWallpaperConfig = "5.bgi" End Select ' Run BGInfo with the selected bgi WShell.Run("Bginfo.exe "&myWallpaperConfig&" /nolicprompt /silent /timer:0")
Arthur Posted October 28, 2011 Posted October 28, 2011 You could create a script that will create a random number say 1 to 5 Like the script in the post above yours?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now