Saturday, April 20, 2013

BGInfo - Auto update script for Windows Server 2008 R2

BgInfo automatically displays relevant information about a Windows computer on the desktop's background, such as the computer name, IP address, service pack version, and more. You can edit any field as well as the font and background colors, and can place it in your start up folder so that it runs every boot, or even configure it to display as the background for the logon screen.

 I am responsible for a number of desktops and servers at work, both virtual and physical. I manage everything via RDP, and during the day I will be connected to 4 or 5 RDP sessions at any given time. If I did not have BGInfo, I would not know for sure what machine I am connected to at any given time.

 

I wrote an auto update batch file and put it into the Startup folder for all users.  This worked fine on Windows 7, but when I would try to use the same script on Windows Server 2008 R2, I would get an error message saying that I dont have the correct permissions set in order to update BGInfo when I would login.   After a bit of tinkering, I have finally figured out a batch file that I can put into startup for all users and have the BGInfo wallpaper update.


  1. Open Notepad and copy paste the following:






@ECHO OFF



C:\BGInfo\Bginfo.exe



C:\BGInfo\config.bgi /TIMER:0 /SILENT /NOLICPROMPT


ECHO Updating BGInfo


ECHO Done!


exit
2. Save the file as bginfo.bat to your desktop.
3. Move/Copy bginfo.bat from your desktop to Start > All Programs > Startup and right click on folder and select Explore All Users
4. Paste bginfo.bat into the Startup folder for All Users
5. You will be prompted to provide administrator permission in order to paste the batch file. Click Continue to paste the file.

Now when you login, BGInfo will auto refresh and show updated IP address, remaining hard drive space, snapshot time, user name, etc.

the script assumes you have BGInfo.exe in c:\BGInfo\

Here is a copy of my config.bgi file as well


Hello!

The purpose of this blog is to post stuff that I find related to networking, security, system administration, etc.