In-Depth
Your Brief Guide to Scripting Tools
Editors exist for all kinds of scripting needs—some free, some cheap, and some not-so-cheap. Use this guide to help you find the right product for your work.
- By Michael Feuda
- 03/01/2002
Scripting in Windows has taken different shapes over the years. Many
administrators started by creating DOS batch files to help perform simple
tasks repetitively and without errors. Today, administrators have the
flexibility of actually programming and enhancing Windows with such scripting
tools as Windows Script Host, VBScript and PERL. While there are many
scripting flavors to choose from, just about any scripting language will
benefit from a scripting editor. Such an editor could help you save time
with your edits and improve your accuracy. In this review, I’ll look at
a couple of script editors. Also, for those of you who are fairly new
to the world of scripting, I’ll provide you with several Web sites to
visit for more information.
A Pair of Scripting Editors
Primalscript, from Sapien Technologies Inc., is a full-featured
and powerful scripting and programming editor. This editor is chock full
of editing features, options and navigational tools. Particularly useful
is the Nexus area, at the left of the screen, which offers a choice of
File, Info, Tools, Snippets or Type Library Browser display. Other great
features include multiple-language support (VBScript, Perl, HTML, DOS
batch files and many others); e-mail and FTP publishing directly from
the editor; and support for source control, spell checking, macro functions
and debug scripting. A feature called Primalsense will help you change
options with specific languages, including code completion and auto case
correction. Every feature is well thought out, easy to use, and well supported
with a great help index. Sapien seems to have packed just about everything
a script creator could want into Primalscript. If you’re looking
for an editor that leaves nothing to the imagination, then look no further.
Primalscript is for you.
KiXtart is a free Microsoft-based scripting enhancement found in the
Windows Resource Kit. There are also updated versions on several Web sites,
including www.kixtart.org. Visual KiXtart Editor, from Version Zero Software,
makes working with KiXtart scripts a much simpler and more efficient task.
You’ll find such features as a File Explorer (which lets you manage multiple
scripts simultaneously) and bookmarks to be handy additions to working
with KiXtart scripts. Best of all, the added colorization and indentation
features make reading and navigating through your KiXtart scripts a breeze.
A great feature of Visual KiXtart Editor is that you can quickly do a
test run of your script directly inside the program. Without this feature,
you’d need to go outside the editor and launch the script manually. For
those of you using or considering KiXtart scripts as part of your routine
network administration, I believe you’ll find that Visual KiXtart Editor
is a “must have” addition to your arsenal of tools. You’ll be able to
save time and be less prone to errors with the feature-rich functions
in the program.
Alternatives
to Using a Scripting Editor |
• Windows Notepad and WordPad (free with Windows)
As mentioned in the KiXtart Editor review above, these
freebies are great if your script is only a few lines.
But when your scripts start getting long or you need
to edit several types of scripts regularly, consider
upgrading to a “real” script editor for fuller functionality
and ease of use.
• Low to Mid-Range Editors (between $30 and $150)
If free text editors aren’t sufficient for your needs,
you might want to invest in an enhanced text or script
editor such as EditPlus (www.editplus.com),
Notetab (www.notetab.com),
TextPad (www.textpad.com)
or UltraEdit (www.ultraedit.com).
If you’re using scripting languages such as WSH, VBScript
and/or Jscript routinely, though, you should consider
investing in a product like Primalscript.
• High-Range Editors (more than $200)
Unless you’re a developer or programmer by trade, higher-end
tools like CodeWright (www.starbase.com)
and Visual SlickEdit (www.slickedit.com)
are probably overkill for your casual scripting projects.
|
|
|
Scripting Alternatives and Resources
Here’s a multiple-choice question: “What’s the best scripting language
to learn and use?” You probably need to consider where you spend most
of your time in order to answer this question properly. For example, if
you spend much of your day working on Web servers, then you might consider
a scripting language that complements Web servers. If you spend most of
your time administrating Windows servers, then perhaps a Windows-oriented
scripting language that could reduce the time spent on routine functions
would benefit you the most. Here’s an overview of just some of the scripting
alternatives out there these days.
|
Figure 1. Primalscript makes it easy to edit
scripts with its Nexus tabs, line numbering and bookmark support.
(Click image to view larger version.) |
Windows Script
The first Web site you should visit is http://msdn.microsoft.com/scripting.
Here you’ll find out about Windows Script Host (WSH), Visual Basic Scripting
Edition (VBScript), and JScript. You’ll also be provided with a well-organized
library of documentation; user’s guides; and, of course, plenty of downloads.
Another Web site worth stopping by for more WSH information is http://home.att.net/~wshvbs.
KiXtart
KiXtart is a free logon script processor that works with Windows XP, 2000,
NT and 9x. Probably the best place to start for this Windows scripting
enhancement is www.kixtart.org. On
this site you’ll find everything you need to get started and keep track
of the latest KiXtart information. There is a caveat to mention about
KiXtart, though: KiXtart is a Resource Kit utility and not officially
supported by Microsoft. Make sure you perform some thorough testing in
a lab environment before putting it into production. Another great source
for KiXtart information and sample scripts is www.script
logic.com/kixtart.
|
Figure 2. Your KiXtart scripts will come to life
with colors and automatic indentation in Visual KiXtart Editor. (Click
image to view larger version.) |
Practical Extraction Report
Language (PERL)
PERL is an open-source language that has its origin on the Unix
platform. It has since been ported to the Windows platform. If you’re
interested in the Windows implementation of PERL, check out www.activestate.com
for a free download and various resources. Also, don’t forget to check
out the article I wrote on PERL scripting, “PERL’s
Hidden Treasures,” in the July 2001 issue of this magazine!
Batch Files
I don’t think it would be proper to talk about scripting options without
mentioning batch files. DOS batch files are most Windows administrators’
first exposure to basic scripting. For many folks, DOS-based batch files
are still in use as part of a daily toolkit. I’ve used DOS batch files
in combination with Microsoft Resource Kit tools for a wide variety of
network administration tasks. One Web site you might find useful on this
topic is www.robvanderwoude.com.
Just click on the Batch files tab off the home page and you’ll find some
great definitions and samples. Also, go to your favorite search engine
and do some searches on things like “dos batch” and “batch files” and
you’ll be offered a multitude of references.
Other Alternatives
There are several other general-purpose scripting languages available
for free. Each has its own features and dedicated following, but none
has really broken through to the mainstream of Windows scripting. These
include Python (www.python.org), Tool
Command Language (Tcl, http://tcl.activestate.com/)
and Ruby (www.ruby-lang.org/en/).
The major benefit to these alternative languages is that, like PERL, they
run on multiple platforms. They’re worth checking out if you need to support
a network with more than just Windows boxes.
General Scripting Sites
To start investigating the wonderful world of scripting, the first place
to start is your local Internet browser. As with most searches, you’ll
probably be provided with pages of sites to check out. Here are some good
starting points:
- http://cwashington.netreach.net/—A
great stop that includes plenty of sample scripts and references to
all of the scripting alternatives I’ve mentioned.
- www.labmice.net—An easy-to-navigate
site. Just click on the “scripting” link off the main page. This site
will provide you with plenty of articles and resources.
- www.desktopengineer.com—Once
again, click on the “scripting” link from the main page. This site focuses
largely on WSH and VBScript.