Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


March 13, 2006

Display System and BIOS Configurations

RSS
Subscribe to Windows IT Pro | See More Internet Explorer (IE) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

HTML Applications (HTAs) are standalone applications that work on Windows OSs with Microsoft Internet Explorer (IE) 5.0 and later. Double-clicking an .hta file runs it like any other executable. HTAs use the IE engine to render the application's menus, buttons, and so on. However, HTAs don't use IE's UI. With HTAs, you design the UI. (For an introduction on how to design HTA UIs, see "Hooked on HTAs," August 2005, InstantDoc ID 46795.)

In HTAs, you can use JScript or VBScript code and such technologies as Windows Management Instrumentation (WMI). I created a utility that uses VBScript code and WMI to retrieve OS information from the local computer. This utility is composed of four files: winutil.hta, winstup.hta, winosys.hta, and winbios.hta. Winutil.hta launches the other three .hta files. You can download the four files from the Windows Scripting Solutions Web site: Go to http://www.windowsitpro.com/windowsscripting, enter 49363 in the InstantDoc ID text box, then click the 49363.zip hotlink.

To install the utility, create a folder on your hard disk and place all the .hta files in it. Double-click the winutil.hta file to obtain the utility's menu, which Figure 1 shows. When you click the Display startup command option, winstup.hta executes and you receive information about the startup commands on the local computer. When you click the Operating System option, winosys.hta runs and you get information about the computer's OS. When you click the Bios option, you receive BIOS data. The menu contains only three items but is designed so that you can easily add other items. For example, suppose you want the utility to display information about the local machine's running processes. In winutil.hta, find the code

‹LI›‹a href="#" on Click="runhta
   ('winxxxhtaa')›Opt #4‹/a›

In this code, replace Opt #4 with an appropriate description (e.g., Running Process) and replace winxxx.hta with the name of the HTA you'll create to display the active processes (e.g., winprocess.hta). You can use winosys.hta as an example of how to write the winprocess.hta file. If you're unsure of the WMI class to use, you can go to the WMI Classes Web page at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_classes.asp. For winprocess.hta, you'd use the Win32_Process class. You can use the utility to do hardware and software inventory on a computer farm. To retrieve the characteristics of a remote computer, you need to change one line in the winstup.hta, winosys.hta, and winbios.hta files. Change the line

strComputer = "." 

to

strComputer = "remote_computer" 

where remote_computer is the remote computer's hostname (e.g., host0001). You must have the rights to execute the HTA on a remote computer. Note that an HTA can contain malicious code, so run only your HTAs in your computer farm.

The utility runs with Windows Scripting Host (WSH) 5.6 and later on Windows 2000 Server, Windows 2000 Professional, and Windows XP.

End of Article



Reader Comments
Your articles are interesting and informative but the constant pop-up or fly-out advertisments are distracting and irritating...especially when reading from my Tablet PC. C'mon! Give me a break. I pay a lot for my VIP Subscription.

hartpd March 24, 2006 (Article Rating: )


Great article.

Moongate April 19, 2006 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

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

WinInfo Short Takes: Week of November 9, 2009

An often irreverent look at some of the week's other news, including some more Windows 7 sales momentum, some Sophos stupidity, Microsoft's cloud computing self-loathing, more whining from the browser makers, Zoho's "Fake Office," and much, much more ...

Understanding File-Size Limits on NTFS and FAT

A general confusion about files sizes on FAT seems to stem from FAT32's file-size limit of 4GB and partition-size limit of 2TB. ...


Related Articles System Inventory Mini-App

Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events WinConnections and Microsoft® Exchange Connections

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


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 DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement