Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


August 2005

BGInfo

Keep an eye on system info
RSS
Subscribe to Windows IT Pro | See More Performance Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

Regardless of the number of systems you manage, you probably spend more time than you'd like digging through various system utilities and Control Panel applets, searching for a specific piece of configuration information such as computer name, IP address, logon server, or boot time. Instead, you can use Sysinternals' BGInfo, a free tool that gives you easy access to relevant system information. Besides supporting an array of built-in information fields, BGInfo can display registry values, file versions, Windows Management Instrumentation (WMI) query results, and more—as part of the system desktop background. You also can customize the display's foreground and background colors and fonts, and because BGInfo generates a static desktop background and then exits, the tool doesn't consume system resources. The tool runs on Windows NT 4.0 and later and Windows 95 and later.

Basic Configuration
When you execute BGInfo for the first time, it displays the Default configuration window that Figure 1 shows. The tool automatically applies this configuration after 10 seconds unless you click somewhere in this window. The window lets you shape the text and data fields that the tool prints on the desktop. BGInfo includes support for an array of built-in fields, referenced within angle brackets (< >) in this window's main area. For example, the default layout prints Boot Time: and the value of the built-in <Boot Time> field on the first line of the display.

The Fields list on the right side of the Default configuration window stores BGInfo's built-in fields, all of which print on the desktop as part of the default configuration. If you delete a field from the main area and then want to add it back, simply place the cursor in the main area in the location you want the field, select the field from the Fields list, and click Add. For fields that can contain multiple values (e.g., IP and MAC addresses on systems that host multiple network adapters), BGInfo creates a separate entry for each value.

Custom Fields
What if you want to display a system or application setting for which BGInfo has no built-in field? Simply click Custom to open the Define New Field dialog box, which Figure 2 shows. BGInfo offers a variety of potential information sources, including environment variables, registry values, file version information—even the contents of a text file.

The VBScript and WMI query options extend the possibilities for displayed data to just about anything. To define a new field as a VBScript file, choose the VB Script file option and enter the path to the script in the Path box (or click Browse to navigate to and select the script). BGInfo will execute the script, using the output of any invocations of the Echo command that you place in the script to replace the field value. You can even use the Field function in your script to have the script reference the value of a built-in BGInfo field.

To define a new field as a WMI query, choose the WMI Query option, then click Browse to open the WMI Query Selection dialog box. In this dialog box, you can select any property of any registered WMI class to have BGInfo fill in the WMI query box with a basic query that you then can edit, if necessary. To ensure that your query produces the results you expect, click Evaluate to test the output of your query.

Formatting and Location
You can format any aspect of BGInfo's output, including position, font size, and font color. You can insert images by using the main window's Edit, Insert Image menu option. The main window's Background button lets you specify the desktop background you want to apply. The Copy user's wallpaper settings option generates a bitmap based on the current desktop background, or you can override that background by selecting Use these settings and choosing a different wallpaper or background color. Regardless of which option you pick, you can have BGInfo overlay its output in an opaque text box on top of the background or show the background behind the text.

BGInfo's default behavior, which Figure 3 shows, is to display output at the lower right of the local monitor, but you can override these behaviors. Click Position on the Default configuration window to open the Position dialog box, which you can use to choose a different text-box location. Click Desktops to open the Desktops dialog box, which you can use to decide how the tool will appear on various types of desktops: the current User Desktop (the default), the Logon Desktop for Console users (i.e., the Winlogon screen), and the Logon Desktop for Terminal Services users. If you want to prevent BGInfo's information from appearing on a desktop, select the Do not alter this wallpaper or the Change this wallpaper to [None] option for that desktop type.

Using Configuration Files
When you finish configuring BGInfo's display and apply it (by clicking Apply on the Default configuration window), BGInfo saves the configuration to the current user's registry, from which the tool retrieves its configuration information when you run BGInfo without specifying a configuration file. To store the configuration in such a file, which you then can reference by running the tool from the command line and specifying the filename, select File, Save from the Default configuration window's menu bar.

Some information, such as disk space usage, can change from boot to boot or even during a boot session, so you might want to configure BGInfo to run at startup or periodically. The easiest way to have BGInfo refresh the desktop at user logon is to place a shortcut to the tool in the user's Startup folder, then use Task Scheduler to define the execution interval at which you want the tool to update the desktop with the most recent data.

Regardless of how you run BGInfo, you'll probably want to use the tool's /timer argument to reduce the length of time that BGInfo displays before applying the configuration. If you're running the tool on a Terminal Server system, you can use the /all argument to have BGInfo update the desktops of all currently logged-on users. The command that Listing 1 shows has BGInfo immediately generate a desktop background according to the configuration stored in a configuration file named desktop.bgi, then exit.

In case you don't want to display BGInfo's output on the desktop, the tool offers other ways to view its data. The /popup argument instructs BGInfo to display output in a window; including the /taskbar argument causes the tool to run in the system tray and display the text box when you double-click its icon. Or, you can select File, Database Settings from the Default configuration window's menu bar to open a dialog box in which you can direct the tool to store its data in a file or database—letting you use BGInfo as a light-weight network-inventory tool.

Keep Data in Sight
BGInfo's customization and extensibility let you use it to display commonly accessed data on your own desktop or to perform thorough inventories of all the computers on your network. You can download the tool and get more information about its operation at http://www.sysinternals.com/utilities/bginfo.html.

End of Article



Reader Comments
We use this tool to clearly identify when an administrator is logged into a machine on the network: It lists our account name prominently, and helps reduce admins forgetting they are logged into a computer and walking away.

wosully July 30, 2005 (Article Rating: )


Great tool, unfortunately none of the custom fields get written to the database and the command line lacks a write to database switch.

SpinningWheel August 02, 2005 (Article Rating: )


Where is the DOWNLOAD!!!

Edpicolo March 12, 2007 (Article Rating: )


Same thing here, looking to automate a script or pkg the program the config file and an automated task that will be used to push out to every build we do. But seems the custom fields do not update in the database is my problem :( anyone know of a work around? EULA states we cant mess with the files.....

clintontull March 23, 2007 (Article Rating: )


This does work if you look in your SQL db the new custom fields should be there, re link your access database and it should work. i exported the data to write to an excel file and it exported all custom links so why not sql. it is check the db and ill be you 100% they are there.!?!?!?!?!

clintontull March 23, 2007 (Article Rating: )


haven't seen it yet!

bimbeaux February 07, 2008 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
PsExec

This freeware utility lets you execute processes on a remote system and redirect output to the local system. ...

Microsoft Delivers Service Pack 2 Beta 2 for Vista, Server 2008

Microsoft on Tuesday announced the availability of the Beta 2 version of Service Pack 2 (SP2) for Windows Vista and Windows Server 2008. Since both operating systems were developed from the same code base, they have a common servicing structure and thus ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Concrete Ways to Make Sure Your SharePoint Deployment Doesn't Blow Up

Virtualization Management

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing