Using the Generic Script Resource Type

The Generic Script resource type provides an easy way to achieve high availability for applications that can be controlled through scriptable interfaces (for example, ActiveX objects or WMI providers). If you have an application that can be started, stopped, and monitored through a script, you can run the application as a scripted resource and implement the Generic Script resource DLL entry points in the script file. A scripted resource is an instance of the Generic Script resource type under the control of a script.

To create a scripted resource

  1. Create a script file that implements required and optional entry points. See Scripting Entry Points.
  2. Create an instance of the Generic Script resource type (see Creating Resources).
  3. Set the ScriptPath property to specify the location of your script file (see Setting Properties).

For each instance of a scripted resource, the Generic Script resource DLL runs an instance of your script in a separate worker thread. Thus there is no need to implement instance management in your script; as far as your script is concerned there is one and only one resource instance.

The Generic Script resource DLL also creates a script object representing the resource. This object, Resource, allows your script to change properties