Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

August 11, 2006 12:00 AM

How to Get Started Writing Scripts

Resources recommended by scripting experts
Windows IT Pro
InstantDoc ID #92751
Rating: (1)

A few months ago, I received an email message from a reader saying that he has the desire and time to learn scripting but doesn't know where to start. That message prompted me to contact several scripting experts and compile a list of resources that this reader and others could use to learn scripting in the Windows environment.

To begin, it helps to know the basic concepts behind scripting. The article "An Introduction to Scripting Technologies and Object Models" (May 2000, InstantDoc ID 8599) provides an easy-to-understand overview of scripting. Before I go any further, however, let me mention two important notes:

  1. I reference Windows Scripting Solutions, Windows IT Pro, Microsoft, and third-party resources. All the Windows Scripting Solutions and Windows IT Pro article references include an InstantDoc ID. To access these articles, simply go to http://www.windowsitpro.com, enter the specified number in the InstantDoc ID box at the top of the page, and click Go. As a Windows Scripting Solutions subscriber, you can access all Windows Scripting Solutions articles. For the benefit of readers who aren't also Windows IT Pro subscribers, I'm making all the Windows IT Pro articles I mention available for public viewing until October 2.
  2. Some of the articles and books I mention aren't recent, but they're still good references for learning scripting. To borrow an old cliche, they're "oldies but goodies."

One point that "An Introduction to Scripting Technologies and Object Models" brings up is that there are different scripting languages. Because many scripting languages exist, I decided to narrow the list. I cover the languages of Windows shell scripting, VBScript, JScript, Perl, and T-SQL. For those of you who aren't new to scripting but who haven't had a chance to start working with Windows PowerShell (formerly code-named Monad), I also include some resources for learning this new command-line shell's scripting language, which is called Powerscript.

Which languages you should you learn depends on the systems you work with. If you work with Windows, I suggest you start by learning shell scripting and VBScript. If you work with Microsoft SQL Server, you should probably start with shell scripting and T-SQL. Note that I specified two languages in each case. As with chocolate and potato chips, getting just a taste of learning makes you hungry for more.

Shell Scripting
The scripting language that the Windows command processor (cmd.exe) uses is often referred to as Windows shell scripting. The 10-part series "Shell Scripting 101" is an excellent tutorial for people who want to learn to write .bat and .cmd scripts. (If you're wondering about the difference between .bat and .cmd scripts, read Lesson 2.) This series walks you through the basics and even includes practical exercises you can try on your own. The articles in this Web-exclusive series are

  • "Shell Scripting 101, Lesson 1," January 2001, InstantDoc ID 16355
  • "Shell Scripting 101, Lesson 2," February 2001, InstantDoc ID 19840
  • "Shell Scripting 101, Lesson 3," March 2001, InstantDoc ID 20142
  • "Shell Scripting 101, Lesson 4," April 2001, InstantDoc ID 20530
  • "Shell Scripting 101, Lesson 5," May 2001, InstantDoc ID 20781
  • "Shell Scripting 101, Lesson 6," June 2001, InstantDoc ID 21310
  • "Shell Scripting 101, Lesson 7," July 2001, InstantDoc ID 21630
  • "Shell Scripting 101, Lesson 8," August 2001, InstantDoc ID 21984
  • "Shell Scripting 101, Lesson 9," September 2001, InstantDoc ID 22289
  • "Shell Scripting 101, Lesson 10," October 2001, InstantDoc ID 22582

After you go through that series, I suggest checking out the following articles:

  • "Getting Started in NT Shell Scripting, Part 1," March 2000, InstantDoc ID 8182
  • "Getting Started in NT Shell Scripting, Part 2," April 2000, InstantDoc ID 8384
  • "The FAQs About Setting Up Your Shell Scripting Environment," May 2006, InstantDoc ID 49676

One book that several scripting experts recommend is Tim Hill's Windows NT Shell Scripting (Macmillan Technical Publishing, 1998).

Related Content:

ARTICLE TOOLS

Comments
  • Siddram
    6 years ago
    Nov 10, 2006

    it nice

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.