From TheAlmightyGuru
Revision as of 15:08, 16 May 2022 by TheAlmightyGuru (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

JScript is a scripting language created by Microsoft as a custom implementation of JavaScript. It is executed in Windows by the Windows Scripting Host using Microsoft OLE Automation, just like VBScript. It was first released for use with Internet Explorer 3.0 in August 1996, and has been included with every desktop version of Windows since Windows 98. It was last updated on 2011-03-14 with the release of Internet Explorer 9.0. Microsoft has silently discontinued the language in favor of JScript .NET. Unfortunately, JScript .NET is hardly a replacement as it must be compiled before using. As a derivative of JavaScript (thus Java, and ultimately C), the language is case-sensitive. Unlike JavaScript, JScript only works with Microsoft Windows, so it's not useful for cross-platform design. Also, the name of the language was poorly thought out because most Internet searches turn up results for JavaScript instead.


I first learned about JScript in the mid-2000s because I often accessed the Windows Scripting Host to have access to some functions not available in the language I was working in at the time. Later, I found that you could write and execute standalone .js and .vbs files in JScript and VBScript. Since then, I have used JScript to write various scripts to automate processes in Windows including running programs that support command line access, accessing the ImageMagick ActiveX, and performing instructions more complex than those supported by Windows batch files. Examples of each of these implementations can be seen in the example scripts I have on this site.



This is the latest help documentation for Windows Scripting which implements JScript. Microsoft's latest version is 5.7, but, as far as I know, the last help documentation they released was for version 5.6.

Basic Operations

Message Box

var shell = new ActiveXObject("WScript.Shell");
shell.Popup("Hello World.");