There are the following technology choices for a Windows Automation Tool
a) VBA with Excel
b) Perl
c) Powershell
d) HTML for Applications (HTA)
1. VBA with Excel
VBA (Visual Basic for Applications) with Excel is good option to consider. VBA allows for a quick development of a fairly reasonable user interface. VBA includes a Userform to which one can controls like textbox, listbox, combo box, radio button etc. These controls can then invoke VBscripts in the background which can perform resource management tasks. For some more detail on how to create the Userform with controls look at my earlier post Stir fry a VBA application quickly. Besides, the results can be populated in the Excel sheet
A screen shot of a VBA with Excel is shown below
Pros
- Ease of building a GUI using the Visual Basic User form with appropriate controls
- The VBA will include VBscripts that will perform resource management tasks
- Can populate the results into Excel sheet.
- The results from the Excel sheet can be saved as CSV, HTML etc
Cons
- Not all client sites have MS Office installed on them. This makes it difficult to deploy Excel with VBA.
2. Perl
Perl allows for easy creation of scripts to manage Windows Resources. The language is easy to use and facilitates quick prototyping. However Perl by itself does not provide for the creation of a GUI. Perl scripts can only be run in command line mode.
Pros
- Ease of scripting
Cons
- Does not allow for creation of a GUI
3. Powershell
Powershell is a convenient way for creating resource management scripts. It is surprising the Microsoft took such a long time to progress from the clunky “command” shell to Powershell which is more on the lines of Korn, Bourne and Unix shell. The nice part is that instead of the cryptic Unix commands the commands have a verb-noun combination for e.g. get-date, get-command etc. The benefit of Powershell is the extensive help that is available for each command. Powershell is in many ways similar to Perl. Building a GUI with Powershell is quite involved and requires quite a bit of programming. Moreover Powershell is installed by default only on Windows 7 and later. For an excellent tutorial on Powershell do read Powershell tutorial by Jesse Hamrick
Pros
- Ease of scripting for resource management
- Extensive help available for query while building resource management commands
- Can format output easily into list, table or Excel sheet
- Easy to build stand-alone scripts
Cons
a. Building a GUI based tool is fairly involved
4. HTML Applications (HTA)
HTML application brings the power of the browser for the front end with VBscript or JScript as the backend. But to build a easy to use GUI there is a need to use Web page builders like Microsoft’s FrontPage, Dreamweaver etc. The controls on the Web page can invoke VBScript to run resource management tasks
Pros
- Can build a user-friendly front-end using Web page builder tools
- Resource management tasks can be executed by VBscript
Cons
- Needs a regular Web page building tool like MS FrontPage or Dreamweaver