Following is the process I took to set-up Bginfo on one of the servers I’m responsible for.
Bginfo.exe is a Portable Executable (PE) Sysinternals tool that displays configuration info of pretty well anything you want on the desktop.
Often quite useful for dev and test servers.
Why I set Bginfo up
The main reason for doing this was so we could track:
- IIS sites
- what database each is using
- which domain each is using.
All at a glance.
The idea of this was to help make sure no one deployed software to the wrong place,
and also tell us which databases are being used by what at any time.
With the initial set-up, the IISSites.txt needed to be kept up to date.
In saying that, if you wanted to invest the time,
you could write a script to do this,
and have Bginfo run it and subsequently update the desktop bitmap.
Extra configuration info here.
My Basic Steps
- Download the Bginfo Portable Executable (PE).
- Create a folder that all applicable users have permissions to.
I used C:\Documents and Settings\All Users\Desktop\BGInfo - In this folder I put the IISSites.txt that I wanted displayed on the desktop.
- In this folder I put the Bginfo.exe PE.
- Run the Bginfo.exe PE and click Custom.
Add identifier IIS Sites and path to the IISSites.txt which is now in the same folder.
Ok -> File -> Save As…
I saved the config file as configuration. - Create a shortcut to the C:\Documents and Settings\All Users\Desktop\BGInfo\Bginfo.exe in C:\Documents and Settings\All Users\Start Menu\Programs\Startup
This allows Bginfo to run on machine boot.
In this shortcut we need to put the following:
Target: “C:\Documents and Settings\All Users\Desktop\BGInfo\Bginfo.exe” “C:\Documents and Settings\All Users\Desktop\BGInfo\configuration.bgi” /timer:0
Start in: “C:\Documents and Settings\All Users\Desktop\BGInfo”
Comment: Runs Bginfo the Sysinternals tool that updates the desktop bitmap with the info defined in the configuration file. We’ve also got a scheduled task that runs periodically - You can set the timer to 10 while you are editing the settings, so that the UI actually becomes visible to use.
- Also set-up a Windows Scheduled Task to run once a day at 10pm, so that any changes are reflected to the desktop automatically.
You can refresh the desktop image just by running the C:\Documents and Settings\All Users\Start Menu\Programs\Startup\Bginfo.exe shortcut. - To setup the Scheduled Task, you need to use the same settings as the shortcut in the Startup folder, otherwise it won’t run with the configuration file
By default Bginfo saves it’s image file (BgInfo.bmp) to the current users temp directory.
This seems to provide some buggy behavior in which Bginfo can’t delete an image file before creating a new one. This has the effect of overlaying multiple images.
Enough details to work out the fix found here.
What you need to do is run Bginfo with your configuration file so any changes are saved to it. I just used a shortcut with the configuration switch.
Then Bitmap menu -> Loacation… Change radio button to Other directory: and select the same location that the rest of the Bginfo files are.
This allows Bginfo to delete the image file before re-creating. I used the following:
C:\Documents and Settings\All Users\Desktop\BGInfo\
You can update the info in the C:\Documents and Settings\All Users\Desktop\BGInfo\IISSites.txt at any time.
Once you have and saved it, run the C:\Documents and Settings\All Users\Start Menu\Programs\Startup\Bginfo.exe shortcut.
The shortcut contains the config file switch and the timer switch (currently set to 0, so the UI doesn’t run).
The entire suite of Sysinternals tools.
Most, if not all of these are Portable Executables (PE).
No installation required.
They are a great collection of tools.
You can also run the tools directly from online.
A couple of good pod casts on Sysinternals from Xoke from HPR
Part 1
Part 2
Tags: Sysinternals
March 2, 2013 at 13:02 |
[…] Bginfo from Sysinternals […]