Windows Script Host may be used for a variety of purposes, including logon scripts, administration and general automation. Microsoft describes it as an
administration tool. WSH provides an environment for scripts to run – it invokes the appropriate script engine and provides a set of services and objects for the script to work with.
Windows Management Instrumentation is also scriptable by this means. WSH, the engines, and related functionality are also listed as objects which can be accessed and scripted and queried by means of the
VBA and Visual Studio object explorers and those for similar tools like the various script debuggers, e.g.
Microsoft Script Debugger, and editors. WSH implements an
object model which exposes a set of
Component Object Model (COM) interfaces. So in addition to ASP, IIS, Internet Explorer, CScript and WScript, WSH can be used to automate and communicate with any Windows application with COM and other exposed objects, such as using PerlScript to query
Microsoft Access by various means including various
ODBC engines and
SQL, ooRexxScript to create what are in effect Rexx macros in
Microsoft Excel, Quattro Pro,
Microsoft Word,
Lotus Notes and any of the like, the
XLNT script to get environment variables and print them in a new
TextPad document, and so on. The
VBA functionality of Microsoft Office,
Open Office (as well as
Python and other installable macro languages) and
Corel WordPerfect Office is separate from WSH engines although
Outlook 97 uses
VBScript rather than VBA as its macro language.
Python in the form of
ActiveState PythonScript can be used to automate and query the data in
SecureCRT, as with other languages with installed engines, e.g.
PerlScript,
ooRexxScript,
PHPScript,
RubyScript,
LuaScript,
XLNT and so on. One notable exception is
Paint Shop Pro, which can be automated in Python by means of a macro interpreter within the PSP programme itself rather than using the PythonScript WSH engine or an external Python implementation such as Python interpreters supplied with
Unix emulation and integration software suites or other standalone Python implementations et al. as an intermediate and indeed can be programmed like this even in the absence of any third-party Python installation; the same goes for the Rexx-programmable terminal emulator Passport. The
SecureCRT terminal emulator,
SecureFX FTP client, and related client and server programmes from Van Dyke are as of the current versions automated by means of WSH so any language with an installed engine may be used; the software comes with VBScript, JScript, and PerlScript examples. As of the most recent releases and going back a number of versions now, the programmability of
4NT / Take Command in the latest implementations (by means of "@REXX" and similar for Perl, Python, Tcl, Ruby, Lua, VBScript, JScript, and the like) generally uses the WSH engine. The
ZOC terminal emulator gets its ability to be programmed in Rexx by means of an external interpreter, one of which is supplied with the programme, and alternate Rexx interpreters can be specified in the configuration of the programme. The MKS Toolkit provides PScript, a WSH engine in addition to the standard Perl interpreter perl.exe which comes with the package. VBScript, JScript, and some third-party engines have the ability to create and execute scripts in an encoded format which prevents editing with a text editor; the file extensions for these encoded scripts is and and others of that type. Unless otherwise specified, any WSH scripting engine can be used with the various Windows server software packages to provide CGI scripting. The current versions of the default WSH engines and all or most of the third-party engines have socket abilities as well; as a CGI script or otherwise, PerlScript is the choice of many programmers for this purpose and the VBScript and various Rexx-based engines are also rated as sufficiently powerful in connectivity and text-processing abilities to also be useful. This also goes for file access and processing—the earliest WSH engines for VBScript and JScript do not since the base language did not, whilst PerlScript, ooRexxScript, and the others have this from the beginning. WinWrap Basic,
SaxBasic and others are similar to Visual Basic for Applications, These tools are used to add scripting and macro abilities to software being developed and can be found in earlier versions of
Host Explorer for example. Many other languages can also be used in this fashion. Other languages used for scripting of programmes include Rexx, Tcl, Perl, Python, Ruby, and others which come with methods to control objects in the operating system and the spreadsheet and database programmes. One exception is that the
Zoc terminal emulator is controlled by a
Rexx interpreter supplied with the package or another interpreter specified by the user; this is also the case with the Passport emulator. VBScript is the macro language in
Microsoft Outlook 97, whilst
WordBasic is used for Word up to 6, PowerPoint and other tools. Excel to 5.0 uses Visual Basic 5.0. In Office 2000 forward, true Visual Basic for Applications 6.0 is used for all components. Other components use
Visual Basic for Applications.
OpenOffice uses Visual Basic, Python, and several others as macro languages and others can be added.
LotusScript is very closely related to VBA and used for
Lotus Notes and
Lotus SmartSuite, which includes
Lotus Word Pro (the current descendant of
Ami Pro),
Lotus Approach,
Lotus FastSite,
Lotus 1-2-3, &c, and pure VBA, licensed from Microsoft, is used in Corel products such as
WordPerfect,
Paradox,
Quattro Pro &c. Any scripting language installed under Windows can be accessed by external means of PerlScript, PythonScript, VBScript and the other engines available can be used to access databases (Lotus Notes, Microsoft Access,
Oracle Database, Paradox) and spreadsheets (Microsoft Excel, Lotus 1–2–3, Quattro Pro) and other tools like word processors, terminal emulators, command shells and so on. This can be accomplished by means of WSH, so any language can be used if there is an installed engine. In recent versions of the
Take Command enhanced command prompt and tools, the "script" command typed at the shell prompt will produce a list of the currently installed engines, one to a line and therefore CR-LF delimited. ==Examples==