14
December
2011

Seasonal Greeting on BGInfo with VBS

Tagged: VBS
Comments
Facebook_share Twitter_share Reddit_share
All the schools I work in have BGInfo setup to place the school name, username and host name on the desktop wallpaper. I used to use a HTML wallpaper which the schools FOG machine generated on a nightly basis, which allowed to have it place "Merry Christmas" on the wallpaper during december etc... This is something I've wanted t replicate in BGInfo but the only way to add "dynamic" content to the wallpaper is to use external calls, for example I use WMI quiries to place todays date on the wallpaper, the problem here is that there is no accessible variable on the computer which has the value "Merry Christmas" during dcember.

I could just swap the bgi files when the need arrises, but seeing as that would require me to be on site some schools would get wished a merry christmas throughout January aswell, and writing a script to select the correct bgi based on date would mean more work for me if I ever wanted to change the wallpaper.

So I settled on using a vbs script to output text onto the wallpaper, its not the best solution as you can't set custom text styles in the vbs so all messages have to look the same, but it works fone for a 1 line greeting.



The code is pretty basic, all it does is run a case select on the month, with then another case select under that for days of the month. The above script outputs "Merry Christmas" all the way through December and "Happy New Year!" between the 1st and 9th of January.

To use it place the .vbs file in the same folder as your Bginfo.exe and then open your .bgi. Add a new Custom Field and point it at your .vbs file, the field can be called anything you want. When you add it to the desktop remove the Field: which BGInfo adds, that way there is no evidence of its presence when there is no greeting to display.
blog comments powered by Disqus
Html5-badge-h-css3-graphics-semantics
CSS Based on Twitters Bootstrap

88x31
All Content is written by Adam Laycock (Arcath) unless otherwise stated.

A little bit About Me

I am an IT Technician working in Primary Schools, I spend my time outside work writing programs, normally they end up bieng bots and other web based dodads