Windows Script Components (WSC) is a technology that allows programmers using scripting languages like VBScript to create COM components (that is, components based on Microsoft's Component Object Model technology). Ordinarily, COM component creation requires a compiled programming language, such as C++ or Visual Basic. Windows Script Components relies on a runtime module (scrobj.dll) that handles the implementation details of COM, while a script file parsed by the script engine contains the component definition.
The source code for a script component is stored in a Windows Script Component (.wsc) file. This is an XML file that contains the component definition, along with the code for the properties, methods, and events that the component exposes.
In addition, Windows Script Components supports interface handlers, which are compiled COM components that provide the implementation for particular interfaces. Windows Script Components automatically provides support for the interfaces necessary for COM automation, ASP, and DHTML.
Windows Scripts Components automates much of the process of creating a COM component by providing a wizard that collects information on the component to be created and writes it to a .wsc file. To illustrate the operation of the wizard, we'll create a simple math component.
Part I: The Basics
Data Types and Variables
Error Handling and Debugging
VBScript with Active Server Pages
Programming Outlook Forms
Windows Script Host 5.6
VBScript with Internet Explorer
Windows Script Components
Part II: Reference
Part III: Appendixes
Appendix A. Language Elements by Category
Appendix B. VBScript Constants
Appendix C. Operators
Appendix E. The Script Encoder