[ad_1]
Those that have been focused on Windows for any decent amount of time will recognize that Windows has built-in support for multiple scripting languages (not including batch files, which I don’t consider to be a language — that goes for Unix/Linux shell scripts too). The three main contenders:
- VBScript. Initially created in 1996 (so almost 25 years ago), it was released as part of the Windows Script Host. It included basic language functionality, but most of the benefit came from its ability to use COM objects to interact with Windows (files, registry, processes, etc.).
- JScript. This was Microsoft’s version of JavaScript, also called ECMAScript. (It has almost nothing to do with Java either.) It was released for Windows in 1996 as well, as part of that same Windows Script Host. Like VBScript, it included basic language functionality (based on JavaScript 1.x), with the ability to use the same COM objects.
- PowerShell. Built on top of the .NET Framework, this came out in 2006 and offers a tremendous amount of functionality and extensibility with lots of cmdlets, access to the full .NET Framework, and even access to COM objects.
If you look at the history and functionality of these, VBScript and JScript peaked with the release of Windows Script Host 5.1, which came out with Windows 2000 in 2001. New versions released with WSH 5.6, 5.7, and 5.8 brought only minor enhancements. You can find a description of WSH 5.6 (a.k.a. 2.0) added features such as support for parameters being passed to scripts, as well as the .WSF file format that supported including scripts into other scripts. (Needless to say, this quickly became a pre-requisite for the Microsoft Deployment Toolkit, BDD at that point, which leverages both of these features.) But good luck finding anything that describes new features in 5.7 and 5.8. So effectively, VBScript, JScript, and Windows Script Host have been unchanged since 2002. That’s a long time to be “functionally stabilized.” So if you haven’t considered moving away from these, you probably should. (There’s no immediate risk in these being eliminated, since it would likely have an app compatibility impact.)
Weirdly enough, JavaScript/ECMAScript has continued to march forward, gaining a lot of additional functionality — in browsers. If you are a web developer, you probably are using JavaScript in some form (although maybe you are using Microsoft’s TypeScript language which “compiles” into JavaScript, providing more advanced language features like strong typing). But JScript is still stuck in the past — none of that “newness” is available to scripters.
PowerShell, on the other hand, is being updated regularly and has even expanded to other platforms. It is the de facto choice for scripting on Windows today, so it’s something definitely worth knowing. (Check out PSD if you are interested in a version of the MDT scripts transformed into PowerShell. It’s still a work-in-progress.)
Going back in time, there were some other scripting solutions that were widely used on Windows. (If you are still using any of these, it’s time to move on…)
- Kixtart. It hasn’t shown any activity for a number of years, but it is still kicking. (Did you know that initial versions of BDD used Kixstart? We decided to move to VBScript with a Hypertext Application [HTA] to phase this out.)
- WinBatch. This one is still being updated. Like Kixtart, it was used for a lot of logon scripts.
- AutoIt. While probably best known for UI automation (e.g. clicking on wizard buttons to automate software installs), it also has general-purpose scripting capabilities.
In the future, I’ll comment more on “other” scripting languages that exist more outside of the Microsoft “bubble.”
[ad_2]
Source link