Understanding the Windows Scripting Host

Understanding the Windows Scripting HostOne of Windows’s most notable deficiencies when compared with other operating systems is its lack of a batch language for automating tasks. Although the underlying MS-DOS supports batch files, they are of little use in the Windows environment: under Windows 3.1 you can’t even launch Windows programs from batch files. Support staff wishing to automate tasks for their users have been forced to use third-party tools like Wilson WinBatch or JP Software’s Take Command. Because these tools are not part of Windows, they must be separately installed before they can be used. Licensing of these toolsmeans that additional costs are often incurred, which, if the budget is not available, becomes a problem.


The key point about the scripting architecture is that script engines and scripting hosts are independent of one another. Script engines may incorporate some functionality of their own, but the greater part of the power of scripting comes from the script’s ability to use the objects exposed by the host. Scripts can also createOLE Automation objects of other applications on the system such as Microsoft Word and Microsoft Excel, which allows them to control these applications. Scripting is a simple and very powerful way to automate tasks under Windows. You can create scripts using a text editor such as Notepad, and save them to disk as plain text files. When you run a script, the file extension of the script file tells theWindows ScriptingHostwhat language has been used. VBScript scripts must have the extension .VBS. JavaScript scripts use the extension .JS.

The VBScript language will be familiar to anyone who has used Visual Basic or Visual Basic for Applications (VBA.) However it is not a complete implementation of VBA.Microsoft has made a number of simplifications in order to produce a script language that is both lean and fast. For example, there is no GOSUB or WITH statement, and the On…Goto construct is not supported. Arrays must be zero-based. There is no Static keyword. The DDE Link commands are not supported, and you cannot access the Clipboard from a script.

Website: www.pcsupportadvisor.com | Filesize: 35kb
No of Page(s): 4
Click here to download Understanding the Windows Scripting Host.

Related Tutorial

Tags: , , ,

Comments

Leave a Reply