Windows Script Components  

Registering a Script Component

To register a Windows® Script Component, you must have the script component run-time Scrobj.dll available, and it must be registered on your computer. When you install the script component package from the Microsoft® Scripting Technologies Web site, Scrobj.dll is automatically loaded and registered on your computer.

Note   Registration is not required if you are creating a script component to be called via DHTML Behaviors, because Microsoft®Internet Explorer 5.0 can use this type of script component without prior registration.

This topic provides information about:

Registering a Script Component

You can register a script component on a local computer using a variety of methods.

To register a script component

Registering a Script Component for Remote Instantiation

If you intend to create a remote instance of a script component, the script component must be registered on the remote computer where it resides. You must also register it on each local computer from which you intend to instantiate the script component, so that DCOM can have a starting point in the registry from which to find and instantiate the remote script component.

To register a script component for remote instantiation

  1. Determine the program ID and class ID of the script component to be instantiated remotely.
    Note   The script component must have the same class ID on both the local and remote computers, so you must provide a class ID in the script component's <registration> element.
  2. On each local computer, create the following registry entry:
    HKEY_CLASSES_ROOT\componentProgID

    where componentProgID is the program ID of the script component to instantiate.

  3. Under the new entry, create the CLSID key and set its value to the class ID of the script component, enclosing the class ID in brackets.
    Tip   An easy way to create the proper registry information is to register the script component on the server where it will be instantiated. Then using Regedit.exe, locate the HKEY_CLASSES_ROOT\componentProgID entry. From the Registry menu, choose Export Registry File, which creates a .reg file. This file can be distributed to local computers, and users can simply run the file to create the appropriate registry entries.

Unregistering a Script Component

If you no longer need to have a script component registered on your computer, you can unregister it using one of these methods:

See Also

Creating Registration Information | Script Component File Contents | Using a Script Component in an Application