Active Scripting

Last updated

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.

Contents

Uses and history

The Active Scripting technologies were first released in 1996, with the release of the Microsoft Internet Explorer 3.0 (August 1996) and Internet Information Services 3.0 products (December 1996).

Usual applications of Active Scripting include Active Server Pages (ASP) server scripts, Internet Explorer, and Windows Script Host (WSH) scripts automating routine tasks, including use for login scripts, Registry manipulation, and the like. Other administrative uses include Windows Management Instrumentation and Active Directory Service Interfaces. Active Scripting can also be used for general-purpose scripting, such as database programming, text-processing, rapid prototyping, and application macro/scripting programming; some applications use Active Scripting as the main automation method, others do not have a macro facility but the components are available for use via the API; or one may opt to add a language and/or tool not available by default, like programming Microsoft Excel in Perl or REXX rather than Visual Basic for Applications (VBA) or transferring data from a terminal emulator to word processor by way of a spreadsheet when they have dissimilar macro tools or none at all.

For many of the above uses, Active Scripting is an addition to Windows that is similar to the functionality of Unix shell scripts, as well as an incremental improvement upon batch files (command.com), Windows NT style shell scripts (cmd.exe) and, by way of VBScript, the replacement for QBasic, which was last available on the supplementary disc for Windows 95. The majority of the languages used for Active Scripting mentioned below are glue languages, with Perl being the most commonly used third-party script engine.

The interfaces to Active Scripting engines are public, so any developer can create applications that are programmable in Active Scripting languages as well as engines for additional languages.

Implementations

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

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

Related Research Articles

<span class="mw-page-title-main">Microsoft Access</span> Database manager part of the Microsoft 365 package

Microsoft Access is a database management system (DBMS) from Microsoft that combines the relational Access Database Engine (ACE) with a graphical user interface and software-development tools. It is a member of the Microsoft 365 suite of applications, included in the Professional and higher editions or sold separately.

<span class="mw-page-title-main">Shell script</span> Script written for the shell, or command line interpreter, of an operating system

A shell script is a computer program designed to be run by a Unix shell, a command-line interpreter. The various dialects of shell scripts are considered to be scripting languages. Typical operations performed by shell scripts include file manipulation, program execution, and printing text. A script which sets up the environment, runs the program, and does any necessary cleanup or logging, is called a wrapper.

VBScript is a deprecated Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers without error handling and with subroutines and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

Visual Basic for Applications (VBA) is an implementation of Microsoft's event-driven programming language Visual Basic 6.0 built into most desktop Microsoft Office applications. Although based on pre-.NET Visual Basic, which is no longer supported or updated by Microsoft, the VBA implementation in Office continues to be updated to support new Office features. VBA is used for professional and end-user development due to its perceived ease-of-use, Office's vast installed userbase, and extensive legacy in business.

<span class="mw-page-title-main">ActiveX</span> Software framework by Microsoft introduced in 1996

ActiveX is a deprecated software framework created by Microsoft that adapts its earlier Component Object Model (COM) and Object Linking and Embedding (OLE) technologies for content downloaded from a network, particularly from the World Wide Web. Microsoft introduced ActiveX in 1996. In principle, ActiveX is not dependent on Microsoft Windows operating systems, but in practice, most ActiveX controls only run on Windows. Most also require the client to be running on an x86-based computer because ActiveX controls contain compiled code.

This is a "genealogy" of programming languages. Languages are categorized under the ancestor language with the strongest influence. Those ancestor languages are listed in alphabetic order. Any such categorization has a large arbitrary element, since programming languages often incorporate major ideas from multiple sources.

JScript is Microsoft's legacy dialect of the ECMAScript standard that is used in Microsoft's Internet Explorer web browser.

<span class="mw-page-title-main">Windows Script Host</span> Automation technology for Windows

The Microsoft Windows Script Host (WSH) is an automation technology for Microsoft Windows operating systems that provides scripting abilities comparable to batch files, but with a wider range of supported features. This tool was first provided on Windows 95 after Build 950a on the installation discs as an optional installation configurable and installable by means of the Control Panel, and then a standard component of Windows 98 and subsequent and Windows NT 4.0 Build 1381 and by means of Service Pack 4. The WSH is also a means of automation for Internet Explorer via the installed WSH engines from IE Version 3.0 onwards; at this time VBScript became means of automation for Microsoft Outlook 97. The WSH is also an optional install provided with a VBScript and JScript engine for Windows CE 3.0 and following and some third-party engines including Rexx and other forms of Basic are also available.

Windows Management Instrumentation (WMI) consists of a set of extensions to the Windows Driver Model that provides an operating system interface through which instrumented components provide information and notification. WMI is Microsoft's implementation of the Web-Based Enterprise Management (WBEM) and Common Information Model (CIM) standards from the Distributed Management Task Force (DMTF).

Take Command Console (TCC), formerly known as 4DOS for Windows NT (4NT), is a command-line interpreter by JP Software, designed as a substitute for the default command interpreter in Microsoft Windows, CMD.EXE.

In Microsoft Windows applications programming, OLE Automation is an inter-process communication mechanism created by Microsoft. It is based on a subset of Component Object Model (COM) that was intended for use by scripting languages – originally Visual Basic – but now is used by several languages on Windows. All automation objects are required to implement the IDispatch interface. It provides an infrastructure whereby applications called automation controllers can access and manipulate shared automation objects that are exported by other applications. It supersedes Dynamic Data Exchange (DDE), an older mechanism for applications to control one another. As with DDE, in OLE Automation the automation controller is the "client" and the application exporting the automation objects is the "server".

<span class="mw-page-title-main">Visual Basic (classic)</span> Event-driven programming language

The original Visual Basic is a third-generation event-driven programming language from Microsoft known for its Component Object Model (COM) programming model first released in 1991 and declared legacy during 2008. Microsoft intended Visual Basic to be relatively easy to learn and use. Visual Basic was derived from BASIC and enables the rapid application development (RAD) of graphical user interface (GUI) applications, access to databases using Data Access Objects, Remote Data Objects, or ActiveX Data Objects, and creation of ActiveX controls and objects.

An HTML Application (HTA) is a Microsoft Windows program whose source code consists of HTML, Dynamic HTML, and one or more scripting languages supported by Internet Explorer, such as VBScript or JScript. The HTML is used to generate the user interface, and the scripting language is used for the program logic. An HTA executes without the constraints of the internet browser security model; in fact, it executes as a "fully trusted" application.

ActivePerl is a distribution of Perl from ActiveState for Windows, macOS, Linux, Solaris, AIX and HP-UX.

<span class="mw-page-title-main">Micro Focus Unified Functional Testing</span>

Micro Focus Unified Functional Testing (UFT), formerly known as QuickTest Professional (QTP), is software that provides functional and regression test automation for software applications and environments.

<span class="mw-page-title-main">Scripting language</span> Programming language for run-time events

A scripting language or script language is a programming language that is used to manipulate, customize, and automate the facilities of an existing system. Scripting languages are usually interpreted at runtime rather than compiled.

WinWrap Basic (WWB) by Polar Engineering, Inc. is a third-party macro language based on Visual Basic used with programmes of various types which its vendor touts as an alternative to ActiveX, Visual Basic for Applications, and VSTA for this purpose. The WWB software package is used in conjunction with Microsoft development tools including Visual Studio, Visual Studio.NET, and the ActiveX scripting engines. The default file extension for programmes written in this language is .wwb.

<span class="mw-page-title-main">Rexx</span> Command/scripting/programming language

Rexx is a programming language that can be interpreted or compiled. It was developed at IBM by Mike Cowlishaw. It is a structured, high-level programming language designed for ease of learning and reading. Proprietary and open source Rexx interpreters exist for a wide range of computing platforms; compilers exist for IBM mainframe computers.

<span class="mw-page-title-main">Command-line interface</span> Computer interface that uses text

A command-line interface (CLI) is a means of interacting with a computer program by inputting lines of text called command-lines. Command-line interfaces emerged in the mid-1960s, on computer terminals, as a user-friendly alternative to punched cards.

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 Archived 2007-12-17 at the Wayback Machine , by Scott Bekker on Redmondmag.com (January 16, 2001).
  4. 1 2 VSA scripting in .NET Archived 2007-02-11 at the Wayback Machine , by Mark Belles on The Code Project.