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: [1]

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. [2] 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. [3]

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

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

Retirement

Active scripting is regarded complete, and no longer under active development by Microsoft. Furthermore, scripting engines will continue to be shipped with future releases of Microsoft Windows and IIS. [5]

Originally, the .NET Framework had a scripting technology of its own and a separate scripting IDE called Visual Studio for Applications (VSA), [6] [7] 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. [8] However, that entire technology was deprecated in version 2.0 of the .NET Framework, [8] 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).

In 2006, Microsoft introduced Windows PowerShell, which can expose applications via PowerShell cmdlets or PowerShell providers. [9]

See also

Related Research Articles

Active Server Pages (ASP) is Microsoft's first server-side scripting language and engine for dynamic web pages.

<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 command 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 programming language for scripting on Microsoft Windows using Component Object Model (COM) based on classic Visual Basic and Active Scripting.

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.

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".

A Windows Script File (WSF) is a file type used by the Microsoft Windows Script Host. It allows mixing the scripting languages JScript and VBScript within a single file, or other scripting languages such as Perl, Object REXX, Python, or Kixtart if installed by the user. These types of scripts may also be used to link many other external scripts together using a src parameter on the <script> tag in a manner similar to HTML. Windows Script Files have the extension ".WSF". A WSF makes reference to each script module in a very basic XML hierarchy as shown below, adhering to those standards outside the <script> tags. Literal use of "</script>" or "<script>" inside your <script> tags and similar challenges can be handled by the use of CDATA, as shown within the examples.

<span class="mw-page-title-main">Visual Basic (classic)</span> Microsofts programming language based on BASIC and COM

Visual Basic (VB) before .NET, sometimes referred to as Classic Visual Basic, is a third-generation programming language, based on BASIC, and an integrated development environment (IDE), from Microsoft for Windows known for supporting rapid application development (RAD) of graphical user interface (GUI) applications, event-driven programming and both consumption and development of components via the Component Object Model (COM) technology.

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">UFT One</span> Software testing automation tool

OpenText™ UFT One, an AI-powered functional testing tool, accelerates test automation across desktop, web, mobile, mainframe, composite, and packaged enterprise-grade applications.

<span class="mw-page-title-main">Scripting language</span> Programming language designed for scripting

In computing, a script is a relatively short and simple set of instructions that typically automate an otherwise manual process. The act of writing a script is called scripting. Scripting language or script language describes a programming language that is used for scripting.

<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.

Server Core is a minimalistic Microsoft Windows Server installation option, debuted in Windows Server 2008. Server Core provides a server environment with functionality scaled back to core server features, and because of limited features, it has reduced servicing and management requirements, attack surface, disk and memory usage. Andrew Mason, a program manager on the Windows Server team, noted that a primary motivation for producing a Server Core variant of Windows Server 2008 was to reduce the attack surface of the operating system, and that about 70% of the security vulnerabilities in Microsoft Windows from the prior five years would not have affected Server Core. Most notably, no Windows Explorer shell is installed. All configuration and maintenance is done entirely through command-line interface windows, or by connecting to the machine remotely using Microsoft Management Console (MMC), remote server administration tools, and PowerShell.

References

  1. "2. Choosing a Server-Side Scripting Language - Designing Active Server Pages [Book]". www.oreilly.com. Retrieved 2024-02-21.
  2. "[Definition] What Is Cscript.exe & Cscript vs Wscript?". MiniTool. 2021-04-30. Retrieved 2024-02-21.
  3. "Using Windows Script Files (.wsf)". admhelp.microfocus.com. Retrieved 2024-02-21.
  4. "SecureCRT Scripting - FAQ". vandyke.com. Retrieved 2024-02-21.
  5. Rumours of VBScript's Death Have Been Greatly Exaggerated, on Eric Lippert's Blog Fabulous Adventures In Coding on MSDN (April 09, 2004).
  6. Script Happens .NET, article by Andrew Clinick of Microsoft Corporation, in Scripting Clinic on MSDN (July 25, 2001).
  7. Microsoft Takes Wraps Off VSA Development Technology Archived 2007-12-17 at the Wayback Machine , by Scott Bekker on Redmondmag.com (January 16, 2001).
  8. 1 2 VSA scripting in .NET Archived 2007-02-11 at the Wayback Machine , by Mark Belles on The Code Project.
  9. Bright, Peter (August 18, 2016). "PowerShell is Microsoft's latest open source release, coming to Linux, OS X". Ars Technica . Condé Nast. Archived from the original on April 9, 2020. Retrieved May 12, 2020.