BGInfo is a great little tool written by Bryce Cogswell from Sysinternals. I use it extensively because I have so many PCs and VPCs that help me do my daily work supporting customers. I have customized it to display (among other things) the machine name, domain, IP and MAC address. I find BGInfo very helpful when switching between VPCs for example, where there is no other way to quickly discern which machine it is (I know I could change colors or other things, but having quick info on my desktop is best for me).
One of the things I thought would be cool to have right on my desktop is the version of TFS installed on the machine. To that end I rolled a .VBS which can be called by BgInfo which allows it to do just that. Here’s what I end up with…
And here’s how I did it…
- Log into your TF Server using the account you use to administer it. This account should have permissions to execute queries against the TFS DT.
- Set your Desktop background to a color with no image. You can of course use any image you like – far be it from me to tell you otherwise <g>, but this will make it a little easier. Get it all set up and then play with the desktop image.
- Download BGInfo from here and my GetTFSVersion.vbs file (link at the bottom of this post).
- Extract all the downloaded files into a folder in “My Documents”. It may be more tempting to put it under “Program Files” or the like, but with Windows Server 2008 security and UAC it is just easier to pop it in a location your account has full permissions to.
- Run BGInfo and accept the EULA. This only needs to be done once (per user).
- Click the “Time remaining” button in the upper right-hand corner so as to stop the countdown. This will let us work in the app.
- Customize the display as you like, including the machine info you want, then click the CUSTOM button.
- Click “New”, fill out the form as follows and then ”OK” you way back out to the main BGInfo dialog.
- Identifier = TFSVersion
- Replace identifier with = VB Script file
- Path = <Path>\GetTFSVersion.vbs
- Add your new “TFSVersion” identifier to the list of items you will be displaying on the screen by highlighting it in the “Fields” list and then clicking the “<-Add” button.
- Select Bitmap>Location… from the menu and select “User’s application data directory” so you know you have permissions to write the desktop background file the app will create.
- Select File>Save As and save your custom configuration to the same DIR as BGInfo.EXE. Let’s name it MyBGInfo.bgi for the sake of this walkthrough.
- Close BGInfo.
- Edit the GetTFSVersion.vbs file and change the “TFSDT” variable (you’ll see it <g>) to the name of your TFS DT machine. Save the file.
- Create a shortcut to BGInfo.exe with a “Target” that looks something like this:
"C:\Documents and Settings\TREVORH\My Documents\BgInfo\Bginfo.exe" MyBGInfo.bgi /TIMER:0
- Put that shortcut in your STARTUP directory.
Now when you log into this TF server you should see a bunch of useful information (well, depending on what you selected in step 6) as well as the TFS version right there on your desktop!
NOTE: If you use this process on multiple TF servers, don’t forget to repeat Step 11 each time. Unfortunately, there is no way currently to supply parameters to a VBScript, via BgInfo. I suppose there may be a way to automate this part too… what do you think?
Enjoy… and if I missed something or there is a better way to do something here, I look forward to your constructive feedback – please share! 🙂