Registering WSC Objects

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,", 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.)

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.