Sysinternals Bginfo

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:

  1. IIS sites
  2. what database each is using
  3. 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

  1. Download the Bginfo Portable Executable (PE).
  2. Create a folder that all applicable users have permissions to.
    I used C:\Documents and Settings\All Users\Desktop\BGInfo
  3. In this folder I put the IISSites.txt that I wanted displayed on the desktop.
  4. In this folder I put the Bginfo.exe PE.Setting up Bginfo
  5. 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.Bginfo editor
  6. 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 periodicallyBginfo Shortcut in Startup
  7. You can set the timer to 10 while you are editing the settings, so that the UI actually becomes visible to use.
  8. 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.
  9. 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

About these ads

Tags:

One Response to “Sysinternals Bginfo”

  1. How to Increase Software Developer Productivity | Binarymist Says:

    [...] Bginfo from Sysinternals [...]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.

Join 198 other followers

%d bloggers like this: