N1 Grid Service Provisioning System 5.0 User's Guide for the Windows 2000 Plug-In

Additional Windows Component Types

The Windows 2000 Plug-In also provides several additional component types:

Registry Keys Component Type

This component type is used to represent registry keys and their associated values.

Browsing

When you browse for a registry key component, the browser provides a list of registry keys from the main registry roots on the target system. The main registry roots include HKEY_LOCAL_MACHINE, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_USERS, and HKEY_CURRENT_CONFIG. These items appear in the order that they are presented in the registry.

You can select an individual key for check in. Selecting a key will check in that key and all of its children. Double clicking on a key will recursively check down the registry until a value is found. The name of the value is displayed but not its contents. Values can be individually exported.

Exported/Internal File Format

Registry keys are exported into an XML file.

Differences Between Registry Key Versions

During a snapshot, the current state of registry key (and its children) is exported into an XML file. During a difference check, the registry key is re-exported and compared against the original XML file. The standard XML difference comparator is used to generate differences between these files.

Installing a Registry Key

The XML file that represents the registry is read and imported into the target system using an execJava step. Any keys for which values already exist in the target system are overwritten.

Uninstalling a Registry Key

The execJava implementation takes the root of the exported key, and deletes all keys and values beneath it. If the root is a value, it will be deleted.

Error Conditions

Table 3–6 Registry Keys Error Conditions

Action 

Condition 

Result 

Install or Uninstall 

Remote agent does not have administrator privileges 

Installation or uninstallation fails 

Registry File Component Type

A component of this component type contains a registry file (*.reg). Registry files are text files that specify the key and values to add or remove from the registry metabase.


Note –

The provisioning software does not compare versions of a registry file for differences. To be able to view differences between registry files, use the Registry Keys component type instead.


Browsing for a Registry File

To choose a file for this component type, select a *.reg file from the file browser.

Installing a Registry File

Regedit /s file path is called on the *.reg file to write its changes to the registry.

Uninstalling a Registry File

During uninstallation, only the *.reg file used during installation is removed. The registry keys inside the registry file are unaffected. Use the Registry Keys type to enable registry uninstallation.

Error Conditions

Table 3–7 Registry File Error Conditions

Action 

Condition 

Result 

Install 

The supplied *.reg file is not in the proper format for regedit.

Installation fails 

Install 

The agent does not have proper permissions to write into the registry sections designated by the *.reg file.

Installation fails 

Data Source Name Component Type

A component of this component type represents ODBC settings for connecting to a database. You can modify these settings through the Data Source Administrator control panel on the system. The actual settings are stored in specific places in the registry. As a result, the Data Source Name (DSN) resource type is built on top of the Registry Keys resource type. The DSN installation, export, and uninstallation functions directly use the facilities provided by the Registry Key resource handler. The DSN browser mimics the Registry browser to provide an experience closer to the “Data Source Administrator” control panel.

Browsing for a DSN File

When you browse for a DSN component, the browser provides a list of DSN files from the main registry roots on the target system. The DSN roots include User and System. DSN files are displayed in alphabetical order.

You can select an individual DSN file for check in. Double-click on the System and User roots to list the contained DSN entries.

Exported/Internal File Format

On export, the browser exports the key that contains all the DSN settings, as well as the value of the same name in the “ODBC Data Sources” key at the same level in the registry hierarchy.

Uninstalling a DSN File

The DSN uninstallation is based on the registry uninstallation, with the caveat that the path being deleted is the key that contains the DSN settings but not the key that the DSN user interface uses to display the available DSN settings. Special logic exists to delete this key as well. The semantics of this process differ slightly from the registry uninstallation semantics, although both processes use the same executor.

Error Conditions

The DSN system component directly calls the Install method of the registry system component. See Registry Keys Component TypeRegistry Keys Component Type for further information on implementation and possible errors.

Microsoft Windows Batch File Component Type

A component of this component type contains a Windows batch *.bat or command *.cmd file.

Browsing

When you create a component for this component type, you can request that the file browser show only that files that have *.bat or *.cmd extensions.

Error Conditions

Table 3–8 Microsoft Windows Batch File Error Conditions

Action 

Condition 

Result 

Install 

The supplied batch file is not a valid batch file or contains errors. 

Installation fails 

Microsoft Windows Scripting Host Script Component Type

A component of this component type contains Microsoft Windows scripting host (WSH) scripts. These files are text files that are created by either vbscript (*.vbs) or jscript (*.js). These files may also be contained in an XML project file (*.wsf).

Browsing for a Scripting Host Script

When you create a component for this component type, you can request that the file browser show only that files that have *.js, *.vbs, or *.wsf extensions.

Uninstalling a Scripting Host Script

When you uninstall a component of this component type, the script file is removed from the target host. However, any actions that the script performed are not undone.

Error Conditions

Table 3–9 Microsoft Windows Scripting Host Script Error Conditions

Action 

Condition 

Result 

Install 

The supplied file is not a valid *.wsf file or contains errors.

Installation fails