Active Scripting: Difference between revisions
Plushy1emily (talk | contribs) m changed 2016 to 2006 |
|||
(38 intermediate revisions by 25 users not shown) | |||
Line 1: | Line 1: | ||
'''Active Scripting''' (formerly known as '''ActiveX Scripting''') is the technology used in [[Microsoft Windows|Windows]] to implement component-based scripting support. It is based on [[ |
{{Short description|Windows component-based scripting technology}} |
||
'''Active Scripting''' (formerly known as '''ActiveX Scripting''') is the technology used in [[Microsoft Windows|Windows]] to implement component-based scripting support. It is based on [[OLE Automation]] (part of [[Component Object Model|COM]]) and allows installation of additional scripting engines in the form of COM modules. |
|||
==Uses and history== |
==Uses and history== |
||
The Active Scripting technologies were first released in 1996, with the release of the [[Internet Explorer 3|Microsoft Internet Explorer 3.0]] (August 1996) and [[Internet Information Services]] 3.0 products (December 1996). |
The Active Scripting technologies were first released in 1996, with the release of the [[Internet Explorer 3|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-side scripting|server scripts]], [[Internet Explorer]], and [[Windows Script Host]] (WSH) scripts automating routine tasks, including use for login scripts, [[Windows Registry|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. |
Usual applications of Active Scripting include [[Active Server Pages]] (ASP) [[Server-side scripting|server scripts]], [[Internet Explorer]], and [[Windows Script Host]] (WSH) scripts automating routine tasks, including use for login scripts, [[Windows Registry|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. |
||
Line 10: | Line 11: | ||
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. |
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 == |
|||
VBScript and [[JScript]] engines are included with the default installation of Windows versions after [[Windows 95]], and are an optional install with [[Windows CE|CE]]. According to Microsoft and third-party documentation, Visual Basic for Applications (VBA) is a third default scripting engine and is part of the Windows installation and therefore present even if there is not an installation of [[Microsoft Office]], [[WordPerfect Office]], or other software packages that are VBA-programmable. Active Scripting engines for other languages are also available; many are free, some are proprietary (commercial), and at least one [[shareware]] engine (a [[Tcl]] engine in the beta stage of development) is extant. For example, one can add support for [[Perl]] and [[Python (programming language)|Python]] scripting to Windows by installing the [[ActiveState]] Active Scripting engines, which are included in the [[ActivePerl]] and [[ActivePython]] distributions. The standard [[PHP]] installation for Windows includes an engine known as ActivePHP and PHPScript in various versions. Scripting engines implementing other variants of Basic, [[Haskell (programming language)|Haskell]], [[PHP]], REXX (multiple versions), [[Delphi]], [[XSLT]], [[Tcl]], [[Fortn]], [[Lua]], [[Ruby (programming language)|Ruby]] and other languages are also available. The DCL-based scripting language XLNT comes with a scripting engine as well. |
|||
Active Scripting engines are available for several languages. Some of the most popular include:<ref>{{Cite web |title=2. Choosing a Server-Side Scripting Language - Designing Active Server Pages [Book] |url=https://www.oreilly.com/library/view/designing-active-server/0596000448/ch02.html |access-date=2024-02-21 |website=www.oreilly.com |language=en}}</ref> |
|||
* [[ActivePerl]] – [[Perl]] |
|||
* ActivePHP and PHPScript for [[PHP]] |
|||
* ActivePython – [[Python (programming language)|Python]] |
|||
* [[Delphi (software)|Delphi]] |
|||
* [[Fortran]] |
|||
* [[Haskell (programming language)|Haskell]] |
|||
* [[Lua (programming language)|Lua]] |
|||
* [[REXX]] (multiple versions) |
|||
* [[Ruby (programming language)|Ruby]] |
|||
* [[Tcl]] |
|||
* [[VBScript]] and [[JScript]] for Windows versions after [[Windows 95]], optional with [[Windows CE|CE]] |
|||
* [[Visual Basic for Applications]] (VBA) for Windows; and requires [[Microsoft Office]], or other software packages that are VBA-programmable. |
|||
* [[XLNT]] |
|||
* [[XSLT]] |
|||
In Windows, [[CScript.exe]] at the command line and |
In Windows, [[Windows Script Host#Usage|CScript.exe]] at the command line and WScript.exe running in the GUI are the main means of implementation of installed Active Script languages.<ref>{{Cite web |date=2021-04-30 |title=[Definition] What Is Cscript.exe & Cscript vs Wscript? |url=https://www.minitool.com/lib/cscript-exe.html |access-date=2024-02-21 |website=MiniTool |language=en-US}}</ref> 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.<ref>{{Cite web |title=Using Windows Script Files (.wsf) |url=https://admhelp.microfocus.com/uft/en/all/VBScript/Content/html/c999e0fa-3986-41be-90a9-3f8ae3a38253.htm |access-date=2024-02-21 |website=admhelp.microfocus.com |language=en-us}}</ref> |
||
Some software such as [[SecureCRT]] use the WSH functionality to allow automation by means of any installed scripting engine.<ref>{{Cite web |title=SecureCRT Scripting - FAQ |url=https://www.vandyke.com/support/securecrt/scripting_faq.html |access-date=2024-02-21 |website=vandyke.com}}</ref> |
|||
The third-party shell [[Take Command (command line interpreter)|Take Command]] can, as of version 10, be configured for direct interoperability with the script host and its installed engines. |
|||
The script host, related components, and engines are able to be integrated into and called from Windows applications just like any other component. |
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.<ref>[http://blogs.msdn.com/ericlippert/archive/2004/04/09/110508.aspx ''Rumours of VBScript's Death Have Been Greatly Exaggerated''], on Eric Lippert's Blog ''Fabulous Adventures In Coding'' on MSDN (April 09, 2004).</ref> |
||
⚫ | Originally, the .NET Framework had a scripting technology of its own and a separate scripting IDE called ''Visual Studio for Applications'' (VSA),<ref>[http://msdn.microsoft.com/en-us/library/ms974577.aspx ''Script Happens .NET''], article by Andrew Clinick of Microsoft Corporation, in Scripting Clinic on MSDN (July 25, 2001).</ref><ref>[http://redmondmag.com/news/article.asp?EditorialsID=126 ''Microsoft Takes Wraps Off VSA Development Technology''] {{Webarchive|url=https://web.archive.org/web/20071217062427/http://redmondmag.com/news/article.asp?EditorialsID=126 |date=2007-12-17 }}, by Scott Bekker on Redmondmag.com (January 16, 2001).</ref> 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.<ref name="VSA">[http://www.codeproject.com/csharp/vsascripting.asp ''VSA scripting in .NET''] {{Webarchive|url=https://web.archive.org/web/20070211180713/http://www.codeproject.com/csharp/VsaScripting.asp |date=2007-02-11 }}, by Mark Belles on The Code Project.</ref> However, that entire technology was deprecated in version 2.0 of the .NET Framework,<ref name="VSA" /> leaving no clear upgrade path for applications desiring Active Scripting support (although "scripts" can be created in [[C Sharp (programming language)|C#]], VBScript, [[Visual Basic .NET]], and other .NET languages, which can be [[Compiler|compiled]] and executed at run-time via [[Library (computing)|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.<ref name="ars-opensource">{{cite web |last1=Bright |first1=Peter |date=August 18, 2016 |title=PowerShell is Microsoft's latest open source release, coming to Linux, OS X |url=https://arstechnica.com/information-technology/2016/08/powershell-is-microsofts-latest-open-source-release-coming-to-linux-os-x/ |url-status=live |archive-url=https://web.archive.org/web/20200409020253/https://arstechnica.com/information-technology/2016/08/powershell-is-microsofts-latest-open-source-release-coming-to-linux-os-x/ |archive-date=April 9, 2020 |access-date=May 12, 2020 |website=[[Ars Technica]] |publisher=[[Condé Nast]]}}</ref> |
|||
⚫ | Originally, the .NET Framework had a scripting technology of its own and a separate scripting IDE called ''Visual Studio for Applications'' (VSA),<ref>[http://msdn.microsoft.com/en-us/library/ms974577.aspx ''Script Happens .NET''], article by Andrew Clinick of Microsoft Corporation, in Scripting Clinic on MSDN (July 25, 2001).</ref><ref>[http://redmondmag.com/news/article.asp?EditorialsID=126 ''Microsoft Takes Wraps Off VSA Development Technology''], by Scott Bekker on Redmondmag.com (January 16, 2001).</ref> 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.<ref name="VSA">[http://www.codeproject.com/csharp/vsascripting.asp ''VSA scripting in .NET''], by Mark Belles on The Code Project.</ref> |
||
However, that entire technology was deprecated in version 2.0 of the .NET Framework,<ref name="VSA" /> leaving no clear upgrade path for applications desiring Active Scripting support (although "scripts" can be created in [[C Sharp (programming language)|C#]], VBScript, [[Visual Basic .NET]], and other .NET languages, which can be [[Compiler|compiled]] and executed at run-time via [[Library (computing)|libraries]] installed as part of the standard .NET runtime). |
|||
== See also == |
== See also == |
||
Line 31: | Line 46: | ||
== References == |
== References == |
||
{{ |
{{Reflist}} |
||
== External links == |
== External links == |
||
*[ |
* [https://msdn.microsoft.com/en-us/library/fdee6589(v=vs.94).aspx Windows Script Interfaces] – Active Scripting documentation. |
||
*[http://blogs.msdn.com/ericlippert/archive/2004/04/09/110508.aspx Future of VBScript Language] – Information about the future of Active Scripting technologies. |
|||
{{Microsoft Windows components}} |
{{Microsoft Windows components}} |
||
{{Internet Explorer}} |
{{Internet Explorer}} |
||
⚫ | |||
[[Category:Scripting languages]] |
[[Category:Scripting languages]] |
||
⚫ |
Latest revision as of 00:21, 14 September 2024
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.
Uses and history
[edit]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
[edit]Active Scripting engines are available for several languages. Some of the most popular include:[1]
- ActivePerl – Perl
- ActivePHP and PHPScript for PHP
- ActivePython – Python
- Delphi
- Fortran
- Haskell
- Lua
- REXX (multiple versions)
- Ruby
- Tcl
- VBScript and JScript for Windows versions after Windows 95, optional with CE
- Visual Basic for Applications (VBA) for Windows; and requires Microsoft Office, or other software packages that are VBA-programmable.
- XLNT
- XSLT
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
[edit]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
[edit]References
[edit]- ^ "2. Choosing a Server-Side Scripting Language - Designing Active Server Pages [Book]". www.oreilly.com. Retrieved 2024-02-21.
- ^ "[Definition] What Is Cscript.exe & Cscript vs Wscript?". MiniTool. 2021-04-30. Retrieved 2024-02-21.
- ^ "Using Windows Script Files (.wsf)". admhelp.microfocus.com. Retrieved 2024-02-21.
- ^ "SecureCRT Scripting - FAQ". vandyke.com. Retrieved 2024-02-21.
- ^ Rumours of VBScript's Death Have Been Greatly Exaggerated, on Eric Lippert's Blog Fabulous Adventures In Coding on MSDN (April 09, 2004).
- ^ Script Happens .NET, article by Andrew Clinick of Microsoft Corporation, in Scripting Clinic on MSDN (July 25, 2001).
- ^ Microsoft Takes Wraps Off VSA Development Technology Archived 2007-12-17 at the Wayback Machine, by Scott Bekker on Redmondmag.com (January 16, 2001).
- ^ a b VSA scripting in .NET Archived 2007-02-11 at the Wayback Machine, by Mark Belles on The Code Project.
- ^ 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.
External links
[edit]- Windows Script Interfaces – Active Scripting documentation.
- Future of VBScript Language – Information about the future of Active Scripting technologies.