1. Home
  2. Computing & Technology
  3. Visual Basic

VBScript - The System Administrator's Language - Part 3

By Dan Mabbutt, About.com

4 of 5

Discovering HTA's (HTML Applications)

HTA's have actually been available to IE users since IE 5, but for reasons that I'm not quite sure about, they haven't "caught on" like some technologies so a lot of programmers don't know about them. Basically, an HTA is a web page that is run locally rather than from a server.

"Why," you might ask, "do I need a new file type to run a scripted web page? I can code one as an normal HTM file type and run it with a doubleclick. So what's the big deal here?"

Another excellent question. Thanks again for asking.

First, HTA files give you the ability to conveniently change a number of properties in the hosting IE program such as ...

  • Border style
  • Icon style
  • Windowstate

You can find the complete list at Microsoft's MSDN web site.

Second, the security weaknesses of IE have become legendary and in response, Microsoft has changed it so you will be continually pestered with warning message boxes if you try to use an HTM file. But HTA files run as trusted applications, so they're not subject to the same security limits that HTM Web pages are. An HTA runs like any executable written in Visual Basic.

Technically, you could simply change the qualifier of a web page from HTM to HTA and it would still open in IE when you double click it, but to get the real benefit from HTA, you can use a special HTA tag that IE processes. Let's look at that next ...

Explore Visual Basic
By Category
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic
  4. Learn VB 6
  5. Learn VBScript
  6. VBScript - The System Administrator's Language - Part 3

©2009 About.com, a part of The New York Times Company.

All rights reserved.