Windows 7 and Vista Guide to Scripting, Automation
and Command Line Tools

by Brian Knittel

A Manual for the Windows Grease Monkey

Home

Downloads

Guestbook

Errata

Tips

Other Books

 

Tips

In this section, I'm listing tips that didn't make it into the book. If you have something to add to this list, some way to make life easier and better, drop me a line in the guestbook and I'll post it here.

  • Running Command Line Programs and Gathering the Output
    I often want a script to run a command line program and gather its output, which I then write to a file, display as the script's output, or parse for information. I've found that WSH's "Exec" object is fairly tricky to use. The Downloads page has a script example that shows one way I've solved this problem; the example works whether the program generates one line or 10,000 lines of output.