Jump to content

Active Scripting

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 189.170.79.99 (talk) at 02:56, 11 August 2018. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Active Scripting (formerly known as ActiveX Scripting) is the technology used in Windows to implement component-based scripting support. It is based on OLE Automation (part of COM) and allows installation of additional scripting engines in the form of COM modules.

Implementations

Active Scripting engines are available for several languages. Some of the most popular include:

  • VBScript and JScript engines are included with the default installation of Windows versions after Windows 95, and are an optional install with CE.
  • Visual Basic for Applications (VBA) is a third default scripting engine. It is not part of the Windows installation and requires Microsoft Office, or other software packages that are VBA-programmable to be installed. In some cases multiple software packages may share the same VBA installation.
  • A Perl engine provided as part of the ActivePerl distribution.
  • A Python engine provided as part of the pywin32 extension.
  • The standard PHP installation for Windows includes an engine known as ActivePHP and PHPScript in various versions.
  • Haskell.
  • REXX (multiple versions).
  • Delphi.
  • XSLT.
  • Tcl.
  • Fortran.
  • Lua.
  • Ruby
  • The DCL-based scripting language XLNT comes with a scripting engine as well.

In Windows, CScript.exe at the command line and WScript.exe running in the GUI are the main means of implementation of installed Active Script languages. Clicking on an icon or running from the command line, a script, the Run dialogue, etc. will by default run a plain text file containing the code. A Windows Script File (.wsf) is an XML file that can contain more than one script in more than one language in addition to other elements, and are executed by the Windows Script Host.

The third-party shell Take Command can, as of version 10, be configured for direct interoperability with the script host and its installed engines; a WSH engine based on the Take Command language is reportedly now in development.

Some software such as SecureCRT use the WSH functionality to allow automation by means of any installed scripting engine.

The script host, related components, and engines are able to be integrated into and called from Windows applications just like any other component.

Current Status

Active scripting is regarded complete, and no longer under active development by Microsoft. However, the technology is still being supported by Microsoft's Sustaining Engineering Team, which is responsible for bug fixes and security enhancements. Furthermore, scripting engines will continue to be shipped with future releases of Microsoft Windows and IIS.[1]

Originally, the .NET Framework had a scripting technology of its own and a separate scripting IDE called Visual Studio for Applications (VSA),[2][3] and the interfaces to the technology were also available via Active Scripting, allowing even .NET-unaware applications to be scripted using .NET languages. VSA was also meant to replace Visual Basic for Applications.[4] However, that entire technology was deprecated in version 2.0 of the .NET Framework,[4] leaving no clear upgrade path for applications desiring Active Scripting support (although "scripts" can be created in C#, VBScript, Visual Basic .NET, and other .NET languages, which can be compiled and executed at run-time via libraries installed as part of the standard .NET runtime).

Microsoft has also introduced Windows PowerShell, which can expose applications via PowerShell cmdlets or PowerShell providers.

See also

References

  1. ^ Rumours of VBScript's Death Have Been Greatly Exaggerated, on Eric Lippert's Blog Fabulous Adventures In Coding on MSDN (April 09, 2004).
  2. ^ Script Happens .NET, article by Andrew Clinick of Microsoft Corporation, in Scripting Clinic on MSDN (July 25, 2001).
  3. ^ Microsoft Takes Wraps Off VSA Development Technology, by Scott Bekker on Redmondmag.com (January 16, 2001).
  4. ^ a b VSA scripting in .NET, by Mark Belles on The Code Project.