When I began this series on desktop tasks you should be automating, I focused on common tasks, such as keeping Windows temporary directories clean or upgrading applications.
But at some point, if you're serious about desktop automation, you'll want to know how to move beyond individual applications and tasks. I'm talking about scripting, and one of the advantages to writing scripts or macros to do automation is there's more macro and scripting languages for Windows than ever.
One of the most obvious is Microsoft's Windows Script Host (WSH). WSH files (the file format used for such scripts) can be created with nothing more than Notepad or another text editor, and can address just about any system component that has a programmatic interface.
The Windows Script Host language has gained a bad reputation (undeservedly so, in my opinion) because it's been used, through programs like Internet Explorer, to launch exploits. But when used on its own and with proper user permissions, it's a convenient and powerful way to automate many Windows desktop tasks that don't lend themselves naturally to batch-file type operations. The best way to learn about it is to sit down and write a few scripts under the guidance of a good Windows Script Host (WSH) tutorial.
There are also third-party batch languages. One of the longest-lived and best-supported third-party batch scripting solutions is WinBatch, which has a veritable palette of libraries and functions that can control just about every imaginable aspect of Windows' behavior. Although it isn't suited to create actual applications, it can control them -- even when a given application doesn't have an exposed control API.
If you're not a programmer and don't want to spend the time to become one (or the cash to hire one), there are other ways to create macros. One method is to use an application that records your actions, writes the results to a file, then lets you play it back or edit it. Back in the days of Windows 3.1, Microsoft bundled such an application with Windows, called Macro Recorder.
Microsoft has omitted Macro Recorder in subsequent versions of Windows (possibly as a security measure), but plenty of third-party solutions have sprung up in its wake. A basic one is Auto Macro Recorder from ReadmeSoft, while Workspace Macro Pro from Tethys Solutions offers advanced features such as automatically compensating for changing desktop conditions and logging of macro results. Both programs have free trial versions and sliding cost scales, depending on how many workstations you're licensing.
For a macro tool that combines the best of both worlds, check out Aldo's Macro Recorder. It lets you record macros
and integrate Visual Basic Script programming into them as well. Version 4.1 is priced at
Five Windows desktop tasks you should automate
- How to automate Windows software updates
- How to automate cleanup of Windows temporary directories
- How to automate Windows desktop folder synchronization
- How to automate Windows desktop backup tasks
- How to automate advanced Windows desktop tasks
About the author: Serdar Yegulalp is editor of the Windows Insight, (formerly the Windows
Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and
administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more
than 12 years of Windows experience under his belt, and contributes regularly to
SearchWinComputing.com and SearchSQLServer.com.
This was first published in December 2005