Subscribe to Windows IT Pro
February 26, 2001 12:00 AM

Registering WSC Objects

Windows IT Pro
InstantDoc ID #19825
Rating: (0)

Although Windows Script Components (WSC) objects are made of scripting code, they're COM objects. They use a little trick to appear as binary COM Automation objects to clients. All WSC objects specify the same executable—scrobj.dll—in their HKEY_CLASSES_ROOT\CLSID\InprocServer32 subkey. Thus, the registry forwards all clients calling about WSC objects to scrobj.dll, which is a system-provided binary COM object that exposes the IDispatchEx interface. Scrobj.dll, in turn, accepts and dispatches calls to a specific scripting file: the .wsc file that contains the component's functionality. The WSC-specific subkey HKEY_CLASSES_ROOT\CLSID\clsid\ScriptletURL (where clsid is the WSC object's CLSID) establishes the link between the CLSID, scrobj.dll, and the .wsc file. This subkey contains the .wsc file's path. (To learn more about WSC objects, see the Web-exclusive article "Use WSC to Write Reusable Code," http://www.winscriptingsolutions.com, InstantDoc ID 16166. To see an example of how to write and use WSC, see Alistair G. Lowe-Norris, "Scripting Solutions with WSH and COM: Using WSC to Build a Progress Bar Dialog Box." This series appeared in four parts: September 2000, October 2000, January 2001, and February 2001.)

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.