-
Notifications
You must be signed in to change notification settings - Fork 1
Glossary
-
Active Scripting
Active Scripting is the technology used in Windows to implement component-based scripting support which enables interaction with Automation objects.
JScript and VBScript are examples of Active Scripting languages.
Active Scripting pre-dates technologies such as .NET Framework and PowerShell but remains supported in current versions of Windows for backward compatibility.
-
Automation
Automation is the COM-based communication mechanism that allows Windows applications to access and manipulate objects such as
Scripting.FileSystemObject
,Word.Application
,Excel.Application
, etc. -
COM
Component Object Model (COM) technology in the Microsoft Windows-family of Operating Systems enables software components to communicate.
-
ECMAScript
ECMAScript is the standardised scripting language specification upon which implementations of JavaScript are based.
-
JavaScript
JavaScript is a popular scripting language sometimes mistakenly confused with Java.
-
JScript
JScript is Microsoft's implementation of JavaScript used by Internet Explorer (IE).
JScript is also an Active Scripting language (like VBScript) compatible with host environments such as Internet Information Services (IIS) and Windows Script Host (WSH).
-
JSON
JavaScript Object Notation (JSON) is a lightweight data-interchange format.
JSON is easy for humans to read and write. It is easy for machines to parse and generate. It is based on a subset of ECMAScript 3 (ES3).
JSON support was included with JScript 5.8 (used by IE8). However, Windows Script Host (WSH) uses JScript 5.7 which does not include JSON.
-
VBA
Visual Basic for Applications (VBA) was introduced with Microsoft Office 97 to enable users to automate and add custom functionality. VBA support has since been maintained in MS Office for backward-compatibility.
VBA can be generated by recording a macro or edited using the IDE included with MS Office.
VBA source code, forms and project references are embedded in a binary format within the given office document file. This can create significant overheads for developers responsible for ongoing support while also attempting to maintain the integrity of the custom application. For example, VBA code within 2 different versions/instances of a given office document cannot be compared directly. Instead, the corresponding VBA code needs to be first exported to a text-based format before it can be compared.
-
VBScript
Visual Basic Scripting Edition (VBScript) is an Active Scripting language developed by Microsoft that is modelled on Visual Basic.
-
WSH
Windows Script Host (WSH) is a language independent host for Windows Active Script compatible scripting engines such as VBScript and JScript.
Microsoft introduced WSH with Windows 98 and continues to include WSH with the current versions, Windows 10 and Windows Server 2016.
WSH can be invoked from the command line with the
cscript
command:
C:\>cscript
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
Usage: CScript scriptname.extension [option...] [arguments...]
Options:
//B Batch mode: Suppresses script errors and prompts from displaying
//D Enable Active Debugging
//E:engine Use engine for executing script
//H:CScript Changes the default script host to CScript.exe
//H:WScript Changes the default script host to WScript.exe (default)
//I Interactive mode (default, opposite of //B)
//Job:xxxx Execute a WSF job
//Logo Display logo (default)
//Nologo Prevent logo display: No banner will be shown at execution time
//S Save current command line options for this user
//T:nn Time out in seconds: Maximum time a script is permitted to run
//X Execute script in debugger
//U Use Unicode for redirected I/O from the console
https://en.wikipedia.org/wiki/Windows_Script_Host
[Windows Script Host (MSDN)](https://msdn.microsoft.com/en-us/library/9bbdkx3k(v=vs.84).aspx)
-
WSF
Windows Script File (WSF) is an XML-based file format used by Windows Script Host (WSH).
The WSF
<script>
tag is used to embed or reference executable script, like the HTML<script>
tag.WSH executes a version of JScript based on ECMAScript 3 (ES3) that lacks modern JavaScript features such as JSON and the
console.log
function. However, these features can easily be added by referencing external scripts. For example:<job> <script language="JScript" src="lib\json2.js" /> <script language="JScript" src="lib\console-log.js" /> <script language="JScript"> var o = { name: "My Object" }; console.log(JSON.stringify(o)); </script> </job>