6Foot2 Posted April 19, 2012 Posted April 19, 2012 I wonder if someone can help? I have been asked by our PE Department to place a countdown clock on student desktops. The target for the countdown is the Olympics in London later this year. I had thought that I could incorporate it into a custom field in BGInfo but none of the scripts I am looking at seem to do the job. Are there any VBScript wizards out there that could prepare a script suitable for use in a Custom Field in BGInfo? Thanks.
Steve21 Posted April 19, 2012 Posted April 19, 2012 Try this: olympics=CDate("27/07/2012 00:00:00") wscript.echo("It is " & DateDiff("d", Now(), olympics) & " days to the olmypics!") Only basic, but can be modified easily. (Check date, think it's right one) -Edit or do you wnat hours/seconds etc? Steve 1
SYNACK Posted April 19, 2012 Posted April 19, 2012 BGinfo will only update at each logon I think so if they want an active clock you may need to look for other alternatives, do they have a gadget: How do I deploy windows gadgets via Group Policy using windows server 2003. 1
6Foot2 Posted April 19, 2012 Author Posted April 19, 2012 Hi Steve. Your suggestion works as a standalone VBS script but gives an error when added to BGInfo: http://img849.imageshack.us/img849/5052/bginfovberror.jpg
Steve21 Posted April 19, 2012 Posted April 19, 2012 Hi Steve. Your suggestion works as a standalone VBS script but gives an error when added to BGInfo: http://img849.imageshack.us/img849/5052/bginfovberror.jpg Mmm seems bginfo does it silly, try removing the wscript and just using echo Steve 1
6Foot2 Posted April 19, 2012 Author Posted April 19, 2012 (edited) Try this: olympics=CDate("27/07/2012 00:00:00") wscript.echo("It is " & DateDiff("d", Now(), olympics) & " days to the olmypics!") Only basic, but can be modified easily. (Check date, think it's right one) -Edit or do you wnat hours/seconds etc? Steve Hours and seconds would be good! Edit: Got it working now thanks to your earlier suggestion [remove wscript] Now if we can do hours and seconds... Edited April 19, 2012 by 6Foot2
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