COM, Registry, and Events for
HP OpenVMS Developer's Guide


Previous Contents Index


Chapter 14
OpenVMS Registry Server Management

14.1 Managing the OpenVMS Registry Server from the Command Line

The OpenVMS Registry includes a server management utility that allows you to update and display OpenVMS Registry information from the OpenVMS DCL prompt.

The utility also allows you to back up and restore the entire OpenVMS Registry database to or from a file, as long as you have the required system privileges. For more information about backing up and restoring the OpenVMS Registry database, see Section 14.2 and the CREATE SNAPSHOT, EXPORT, and IMPORT commands in the command reference section of this chapter.

To start the OpenVMS Registry server management utility, enter one of the following commands:



$ RUN SYS$SYSTEM:REG$CP 

Note

Before you can access the OpenVMS Registry database, the OpenVMS Registry server must be running either in the cluster or on the standalone system.

Table 14-1 lists and describes OpenVMS Registry server management utility commands.

Table 14-1 OpenVMS Registry Server Management Utility Commands
Command Identifier Action
CREATE DATABASE SYSPRV Creates a new set of OpenVMS Registry database files.
CREATE KEY REG$UPDATE Creates one or more keys in the OpenVMS Registry database.
CREATE SNAPSHOT SYSPRV Makes an immediate backup of the OpenVMS Registry database files.
CREATE VALUE REG$UPDATE Specifies the data component for a key.
DELETE KEY REG$UPDATE Removes one or more keys from the OpenVMS Registry database.
DELETE TREE REG$UPDATE Removes the specified key and all of its subkeys from the OpenVMS Registry database.
DELETE VALUE REG$UPDATE Removes one or more values from a specified key.
EXIT   Enables you to exit from REG$CP and return to the DCL command prompt.
EXPORT DATABASE SYSPRV Exports the entire OpenVMS Registry database file to a text format file.
EXPORT KEY SYSPRV Exports a specific OpenVMS Registry key (and optionally subkeys) to a text format file.
HELP   Displays information about using the REG$CP utility and includes formats and explanations for commands, parameters, and qualifiers.
IMPORT REG$UPDATE Imports a text format version of a registry database to the OpenVMS Registry format.
LIST KEY REG$LOOKUP Displays all subkey information for a specified key.
LIST SECURITY DESCRIPTOR REG$LOOKUP Displays the security descriptor associated with the specified key.
LIST VALUE REG$LOOKUP Displays all values of a specified key.
MODIFY KEY REG$UPDATE Modifies the information of a specified key.
MODIFY TREE REG$UPDATE Modifies the information of a specified key and its subkeys.
MODIFY VALUE REG$UPDATE Modifies the information of a specified value.
SEARCH KEY REG$LOOKUP Displays the path name of all keys that match a specified key.
SEARCH VALUE REG$LOOKUP Displays the path name of all keys that match a specified value name.
SHOW COUNTERS REG$PERFORMANCE Displays counter information.
SHOW FILE REG$PERFORMANCE Displays OpenVMS Registry database file statistics.
SPAWN   Creates a subprocess of the current process.
START MONITORING REG$PERFORMANCE Enables monitoring functions.
STOP MONITORING REG$PERFORMANCE Disables monitoring functions.
WAIT   Waits for the specified number of seconds, or waits for a random number of seconds within a range of seconds for command completion.
ZERO COUNTERS REG$PERFORMANCE Resets monitoring counters.

Note

A user who has the SYSPRV privilege can can execute all the commands listed in Table 14-1. You must specify an OpenVMS Registry identifier only if the user does not have SYSPRV privilege.

If you grant a user the REG$UPDATE identifier, in addition to the commands listed in Table 14-1, the user can also execute the following commands:

LIST KEY
LIST VALUE
SEARCH KEY
SEARCH VALUE

If you do not grant a user the REG$LOOKUP identifier, the user cannot examine keys (LIST KEY, LIST VALUE, SEARCH KEY, SEARCH VALUE, or EXPORT KEY or DATABASE) that are protected from world read access. However, the default for almost all keys created in a new database is world read access. The exceptions are keys that have ACLs that prohibit world read access. For example, a user who does not have the REG$LOOKUP identifier cannot execute the following command:



$ REG$CP == "$REG$CP" 

$ REG$CP LIST KEY HKEY_LOCAL_MACHINE\SECURITY 

14.2 Backing Up and Restoring the OpenVMS Registry Database

The REG$CP server management utility includes two commands that allow you to back up and restore an OpenVMS Registry database.

14.2.1 Creating a Snapshot of the OpenVMS Registry Database

Use the following procedure to create a snapshot of the OpenVMS Registry database:

  1. Verify that the REGISTRY_SERVER process is running in the cluster.
  2. From an account with the SYSPRV privilege, enter the following commands:


    
    $ REG$CP == "$REG$CP"
    
    $ REG$CP CREATE SNAPSHOT
    
    

    The resulting snapshot consists of the following two files, located in the specified directory:


    
     REGISTRY$LOCAL_MACHINE.RSS 
    
     REGISTRY$USERS.RSS 
    
    

14.2.2 Restoring a Snapshot of the OpenVMS Registry Database

Note

Before you execute the following procedure, verify the location of the OpenVMS Registry snapshot files REGISTRY$LOCAL_MACHINE.RSS and REGISTRY$USERS.RSS. By default, these files are placed in the SYS$REGISTRY directory. However, they may have been moved or written to a different location. The server writes the files to the location specified in the Snapshot Location value on the HKEY_LOCAL_MACHINE\SYSTEM\Registry key.

Use the following procedure to restore a snapshot of the OpenVMS Registry database:

  1. Shut down all layered products and applications that use the Registry server on all nodes in the cluster.
  2. Shut down the OpenVMS Registry server on all nodes in the cluster. (For information about shutting down the OpenVMS Registry, see Section 13.3.)
  3. Preserve all files in SYS$REGISTRY in a separate directory.
  4. Do one of the following:
  5. Shut down the OpenVMS Registry server.
  6. Delete the files SYS$REGISTRY:REGISTRY$LOCAL_MACHINE.REG and SYS$REGISTRY:REGISTRY$USERS.REG.
  7. Copy the OpenVMS Registry snapshot files to SYS$REGISTRY and rename them as follows:


    
    $ RENAME REGISTRY$LOCAL_MACHINE.RSS REGISTRY$LOCAL_MACHINE.REG 
    
    $ RENAME REGISTRY$USERS.RSS REGISTRY$USERS.REG 
    
    

  8. Start the OpenVMS Registry server. (See Section 13.2.1.)

14.3 OpenVMS Registry Server Management Utility Syntax

The following command section describes each OpenVMS Registry command in alphabetical order.

Note

In all the commands in this section, the key-name parameter is a string that specifies the full path of the key, beginning from one of following entry points:
HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_CLASSES_ROOT

You can also specify the strings REG$_HKEY_LOCAL_MACHINE , REG$_HKEY_USERS , and REG$_HKEY_CLASSES_ROOT .

For all server management commands, links are not followed. (For more information about links, see Section 12.2.1.3.)

To make key and values names case sensitive, enclose the keys and values in quotation marks (for example: "value" ).


CREATE DATABASE

Creates the basic OpenVMS Registry database files in the location specified by the SYS$REGISTRY logical. The command creates an empty database and loads the predefined keys.

If you enter this command and the database files already exist, the utility does not overwrite the existing files. The system displays a warning that the files already exist. If you want to create a new OpenVMS Registry database, you must first delete all previous versions of the database files. If you delete the OpenVMS Registry database files, you will lose all keys, subkeys, and values stored in the OpenVMS Registry.

This command requires the SYSPRV privilege.

The following table lists and describes the OpenVMS Registry database files.
File Description
REGISTRY$ROOT.DAT Root of the database
REGISTRY$USERS.REG HKEY_USERS tree
REGISTRY$LOCAL_MACHINE.REG HKEY_LOCAL_MACHINE tree
REGISTRY$MASTER.RLG The master commit log file
REGISTRY$REPLY.RLG Log file that tracks modification requests to the OpenVMS Registry database


Format

CREATE DATABASE


Parameters

None


Qualifiers

/VERSION=version-number

Specifies how to format the database. Specify a version number of 1 to create a non-indexed database. Specify a version number of 2 to create an indexed database. If unspecified, the default value is 2.

Note

OpenVMS Registry servers running on OpenVMS V7.3-1 or later support both version 1 and version 2 databases. Registry servers prior to OpenVMS V7.3-1 support version 1 databases only.

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> CREATE DATABASE

By default, this command regenerates the basic OpenVMS Registry database files using version 2 format (indexed database).



REG> CREATE DATABASE/VERSION=1

This command causes the basic OpenVMS Registry database files to be regenerated using version 1 format (non-indexed database).


CREATE KEY

Creates one or more keys in the OpenVMS Registry database.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

CREATE KEY key-name [,...]


Parameters

key-name[,...]

Specifies the name of the key to create. You can create multiple keys by separating the keys with commas.

Qualifiers

/CACHE_ACTION=value

Specifies the cache attribute for the new key. The value can be WRITEBEHIND (write to disk later) or WRITETHRU (write to disk immediately).

If you omit /CACHE_ACTION, the system creates the key with the cache attribute set to REG$K_WRITEBEHIND.

/CLASS_NAME=string

Specifies the class name of the key.

/LINK=(TYPE=value, NAME=key-name)

Defines the key as a link to another key. The link value must be one of the following:

To remove a link, enter the following:



/LINK=(TYPE=NONE,NAME="") 

/SECPOLICY=policy

Defines the security policy for the key. Currently the only valid policy is NT_40 .

/VOLATILE=level
/NONVOLATILE (default)

Specifies whether or not the new key is volatile. If you are running the OpenVMS Registry on a standalone OpenVMS system, volatile keys are lost when the system reboots. If you are running the OpenVMS Registry in an OpenVMS cluster, volatile keys are lost when all nodes in the cluster are rebooted.

The values for level are as follows:

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG> CREATE KEY/CACHE_ACTION=WRITEBEHIND 

HKEY_USERS\GUEST, HKEY_USERS\SYSTEM

Creates the GUEST and SYSTEM keys under the HKEY_USERS entry point. The keys are created with the write-behind attribute.


CREATE SNAPSHOT

Creates a snapshot of the OpenVMS Registry database. That is, the system writes all cached OpenVMS Registry keys or values and makes a copy of the OpenVMS Registry database files.

The OpenVMS Registry server copies database files to the location specified by /DESTINATION (SYS$REGISTRY by default), using the file extension .RSS (Registry SnapShot). To restore the snapshot, shut down all applications using the Registry, shut down the Registry server, and copy the files to SYS$REGISTRY, renaming them with the .REG file extension.

Note

When you restore the database from a snapshot, you lose all modifications that were made to the database since the last snapshot was taken.

By default the OpenVMS Registry server creates a snapshot automatically every 24 hours and retains the five most recent snapshot files.

This command requires the SYSPRV privilege.


Format

CREATE SNAPSHOT


Parameters

None


Qualifiers

/DESTINATION=file-spec

Controls where the system will write the snapshot files. By default, the system creates the snapshot in the location specified by the SYS$REGISTRY logical.

If you specify the /DESTINATION qualifier but do not provide a valid directory, the system creates the snapshot files in the directory in which you started the OpenVMS Registry server.

/VERSIONS=number

Specifies how many previous versions of the snapshot files to keep.

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> CREATE SNAPSHOT/DESTINATION=SYS$REGISTRY/VERSION=3

Creates a snapshot of the OpenVMS Registry database in the SYS$REGISTRY directory. If more than three versions of the OpenVMS Registry database snapshot files exist, the system deletes the oldest version (the same as purge/keep=3 command).


CREATE VALUE

Specifies the data component for the specified key. If the value does not exist, the command creates the value.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

CREATE VALUE key-name


Parameters

key-name

Specifies the name of the key for which you will set the value.

Qualifiers

/DATA=value

The value can be one of the following:

Note

You cannot specify the /INPUT qualifier with /DATA.

/INPUT=filename

Specifies that the value data is to be read from a file.

The input value data can be specified in one of the following formats. With the exception of SZ, the format is specified by a keyword at the start of the file. The keyword can be entered in uppercase or lowercase. Input records following a keyword can span multiple lines; use "\" at the end of any continuation lines.

NOTES

/FLAGS=flag

Specifies the data flags value. This is an application-dependent 64-bit flag specified as a decimal number or as a hexadecimal number preceded by 0x or %X.

/LINK=(TYPE=value, NAME=key-name)

Defines the key as a link to another key. The link value must be one of the following:

To remove a link, enter the following:



/LINK=(TYPE=NONE,NAME="") 

/NAME=string

Specifies the name of the new value.

/TYPE_CODE=type

Specifies the type of the new value. The type value must be one of the following:

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG> CREATE VALUE/DATA=COSMOS/TYPE=SZ/NAME=COMPUTERNAME 

HKEY_LOCAL_MACHINE\NODE

Creates the COMPUTERNAME value for the key HKEY_LOCAL_MACHINE\NODE and sets its type to SZ and its data value to COSMOS .



REG> CREATE VALUE 

HKEY_USERS\CVEX1/NAME=SZ-HEX/TYPE=SZ/INPUT=SYS$INPUT 

HEX:41,00,00,00,42,00,00,00,43,00,00,00,44,00,00,00,45,00,00,00,\

46,00,00,00,00,00,00,00

This example creates the SZ-HEX value for the key HKEY_USERS\CVEX1 and sets its type to SZ. The data is entered as hex data. In this particular case, the data equates to the Unicode string "ABCDEF". It would be simpler to enter ABCDEF as a string. However, this format provides the capability of entering any Unicode value, including those you may not be able to input directly as a string.



REG> CREATE POWERS2.DAT 

DEC:2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768,65536,\

131072,262144,524288,1048576,2097152,4194304,8388608,16777216,\

33554432,67108864,134217728,268435456,536870912,1073741824



REG> CREATE VALUE - 

HKEY_USERS\CVEX2/NAME=BIN-FILE/TYPE=BINARY/INPUT=POWERS2.DAT

This example creates data file POWERS2.DAT containing a series of decimal values. Next the user creates the value BIN-FILE for the key HKEY_USERS\CVEX2 and sets its type to BINARY. The raw binary data is read from file POWERS2.DAT to BIN-FILE.


DELETE KEY

Removes a specified key from the OpenVMS Registry database. The system does not delete a key if the key has subkeys.

Caution

Deleting a key results in symbolic links not being followed. This is because the system deletes the key you specify, even if it has symbolic links.

Note

The OpenVMS Registry database predefined keys are reserved keys and cannot be deleted. These keys include HKEY_USER , HKEY_LOCAL_MACHINE , and HKEY_CLASSES_ROOT . For a complete list, see Section 12.3.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

DELETE KEY key-path key-name


Parameters

key-path

Specifies the key path.

key-name

Specifies the name of the key to delete.

Qualifiers

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG> DELETE KEY HKEY_USERS\NODE GUEST

Deletes the GUEST key from the OpenVMS Registry database.


DELETE TREE

Removes the specified key and all of its subkeys from the OpenVMS Registry database.

Caution

Deleting a key results in symbolic links not being followed. This is because the system deletes the key you specify, even if it has symbolic links.

Note

The OpenVMS Registry database predefined keys are reserved keys and cannot be deleted. These keys include HKEY_USER , HKEY_LOCAL_MACHINE , and HKEY_CLASSES_ROOT . For a complete list, see Section 12.3.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

DELETE TREE key-path key-name


Parameters

key-path

Specifies the key path.

key-name

Specifies the name of the top level key of the tree to be deleted.

Qualifiers

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG>  CREATE KEY HKEY_USERS\NODE\GUEST

REG>  CREATE KEY HKEY_USERS\NODE\GUEST\SUBKEY1

REG>  CREATE KEY HKEY_USERS\NODE\GUEST\SUBKEY2

REG>  CREATE KEY HKEY_USERS\NODE\GUEST\SUBKEY1\SUBKEY1_2

REG>  DELETE TREE HKEY_USERS\NODE GUEST

Deletes the GUEST key and its subkeys SUBKEY1, SUBKEY2, and SUBKEY1\SUBKEY1_2 from the OpenVMS Registry database.


DELETE VALUE

Removes a value from a specified key.

Caution

Deleting a value results in symbolic links not being followed. This is because the system deletes the value you specify, even if it has symbolic links.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

DELETE VALUE key-name value-name


Parameters

key-name

Specifies the key name whose value should be removed.

value-name

Specifies the value to remove.

Qualifiers

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG> DELETE VALUE HKEY_USERS\GUEST PASSWORD

Deletes the PASSWORD value from the GUEST key.


EXIT

Enables you to exit from REG$CP and return to the DCL command prompt. You can also return to the DCL command level by pressing Ctrl/Z.

Format

EXIT


EXPORT DATABASE

Exports the entire OpenVMS Registry database contents to a text format file.

The default file format is OpenVMS format. You can also specify that the file be exported as a Windows NT-compatible text file format, which you can use to import key names and values into a Windows Registry.

This command requires the SYSPRV privilege.


Format

EXPORT DATABASE


Qualifiers

/FORMAT=[NT | VMS]

Specifies the format in which the system writes the database. VMS is the default.

If you intend to import the exported text file to an OpenVMS system, do not specify /FORMAT=NT. NT Export Registry File format does not preserve OpenVMS specific data structures.

/LOG

Displays the export progress to the screen.

/OUTPUT=file-name

Specifies a name for the exported file. The default output file name is REGISTRY.TXT .

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> EXPORT DATABASE/LOG/OUTPUT=TUES_VERSION.TXT/FORMAT=VMS

The EXPORT command in this example logs the progress of the export to the screen as the system exports the entire OpenVMS Registry database to the TUES_VERSION.TXT file in VMS format.


EXPORT KEY

Exports a specific OpenVMS Registry database key (and optionally its subkeys) to a text format file. NOSUBKEYS is the default.

The default file format is OpenVMS format. You can also specify that the file be exported as a Windows NT-compatible text file format, which you can use to import key names and values into a Windows Registry.

This command requires the SYSPRV privilege.


Format

EXPORT KEY key-name


Parameters

DATABASE

Exports the full OpenVMS Registry database.

KEY [key-name [/[NO]SUBKEYS]]

Exports a specific OpenVMS Registry key and, optionally, its subkeys. NOSUBKEYS is the default.

Qualifiers

/FORMAT=[NT | VMS]

Specifies the format in which the system writes the database. VMS is the default.

Note

If you intend to import the exported text file to an OpenVMS system, do not specify /FORMAT=NT. NT Export Registry File format does not preserve OpenVMS specific data structures.

/LOG

Displays the export progress to the screen.

/OUTPUT=file-name

Specifies a name for the exported file. The default output file name is REGISTRY.TXT .

/SUBKEY


/NOSUBKEYS) Specifies whether or not the key's subkeys are also to be exported. The default is /NOSUBKEYS.

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

HELP

Displays information about using the REG$CP utility and includes formats and explanations for commands, parameters, and qualifiers.

Format

HELP [keyword [...]]


Parameters

keyword [...]

Specifies one or more keywords for a command and its subtopics.

IMPORT

Allows a user to import key definitions from a text format file (created by the EXPORT command) into an OpenVMS Registry database.

You can also import a Windows NT Export Registry File into an OpenVMS Registry database.

Conversion of Windows Resource Descriptors

You can import Windows resource descriptors into the OpenVMS Registry database, even though OpenVMS does not support NT resource descriptors. Typically, you import keys from a file created using the EXPORT/FORMAT=VMS command. The system displays a message when importing NT resource descriptors and converts them to the binary data type.

This command requires the SYSPRV privilege.


Format

IMPORT


Parameters

None


Qualifiers

/INPUT=file-name

Specifies a name of the file to import. The default input file name is REGISTRY.TXT .

/LOG

Displays the import progress to the screen.

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG> IMPORT/LOG/INPUT=TUES_VERSION.TXT

The IMPORT command in this example logs the progress of the import to the screen as the system imports the TUES_VERSION.TXT file.


LIST KEY

Displays the attributes for the specified key.

Note

Symbolic links are not followed.

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

LIST KEY key-name


Parameters

key-name

Specifies the name of the key to list.

Qualifiers

/CACHE_ACTION

Displays the cache attribute for the key.

/CLASS_NAME

Displays the class name of the subkey.

/FULL

Displays all available information---that is, information displayed by the /LAST_WRITE, /CACHE_ACTION, /INFORMATION, /LINK_PATH, and /CLASS_NAME qualifiers.

/INFORMATION

Displays the information (subkey number, value number, subkey name max, and so on) about the specified key.

/LAST_WRITE

Displays the time when the subkey was last updated.

/LINK_PATH

Displays the key path to which the subkey is linked.

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> LIST KEY/FULL HKEY_USERS\GUEST 

 

Key name:            HKEY_USERS\GUEST 

Security policy:     REG$K_POLICY_NT_40 

Volatile:            REG$K_NONE 

Cache:               REG$K_WRITEBEHIND 

Class:               System Authorization 

Link Type:           REG$K_NONE 

Last written:         7-AUG-1998 12:42:08.55 

 

Key information: 

  Number of subkeys:             2        Number of values: 0 

  Max size of subkey name:      40        Max size of class name: 40 

  Max size of value name:        0        Max size of value data: 0 

 

Subkey(s): 

 

    Key name:            QUOTAS 

    Security policy:     REG$K_POLICY_NT_40 

    Volatile:            REG$K_NONE 

    Cache:               REG$K_WRITEBEHIND 

    Class:               Disk quota 

    Link Type:           REG$K_NONE 

    Last written:         7-AUG-1998 12:41:19.21 

 

    Key information: 

      Number of subkeys:             0        Number of values: 0 

      Max size of subkey name:       0        Max size of class name: 0 

      Max size of value name:        0        Max size of value data: 0 

 

    Key name:            IDENTIFIER 

    Security policy:     REG$K_POLICY_NT_40 

    Volatile:            REG$K_NONE 

    Cache:               REG$K_WRITETHRU 

    Class:               Disk quota 

    Link Type:           REG$K_SYMBOLICLINK 

    Link Path:           HKEY_LOCAL_MACHINE\SOFTWARE\IDENTIFIER\GUEST 

    Last written:         7-AUG-1998 12:42:08.55 

 

    Key information: 

      Number of subkeys:             0        Number of values: 0 

      Max size of subkey name:       0        Max size of class name: 0 

      Max size of value name:        0        Max size of value data: 0 

 

Note

The Max sizes information shows the number of bytes, not characters. (Each character is 4 bytes long.)

LIST SECURITYDESCRIPTOR

Displays the security descriptor associated with the specified key.

A security descriptor consists of a SECURITY_DESCRIPTOR structure and its associated security information. Security information can include security identifiers (SIDs), a system access-control list (SACL), and a discretionary access-control list (DACL).

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

LIST SECURITYDESCRIPTOR key-name


Parameters

key-name

Specifies the name of the key whose security descriptor will be displayed.

Qualifiers

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples

The following LIST SECURITYDESCRIPTOR command displays the security descriptor for the root key, HKEY_USERS.



REG> LIST SECURITYDESCRIPTOR HKEY_USERS 

 

   Security Descriptor: 

 

      Revision:               0x01 

      Control:                0x8004 (SE_DACL_PRESENT, 

                                      SE_SELF_RELATIVE) 

      Owner Sid:              S-1-5-20-220 

      Group Sid:              S-1-5-20-220 

      Dacl: 

         Revision:            0x02 

         Size:                0x0048 

         Ace Count:           0x0003 

 

         Ace #1: 

            Type:             0x00 (ACCESS_ALLOWED_ACE_TYPE) 

            Flags:            0x03 (OBJECT_INHERIT_ACE, 

                                    CONTAINER_INHERIT_ACE) 

            Size:             0x0018 

            Access Mask:      0x000f003f (Full Control) 

            Sid:              S-1-5-20-220 

 

         Ace #2: 

            Type:             0x00 (ACCESS_ALLOWED_ACE_TYPE) 

            Flags:            0x03 (OBJECT_INHERIT_ACE, 

                                    CONTAINER_INHERIT_ACE) 

            Size:             0x0014 

            Access Mask:      0x00020019 (Query Value, Enumerate 

                                       Subkeys, Notify, Read Control) 

            Sid:              S-1-1-0 (World) 

 

         Ace #3: 

            Type:             0x00 (ACCESS_ALLOWED_ACE_TYPE) 

            Flags:            0x03 (OBJECT_INHERIT_ACE, 

                                    CONTAINER_INHERIT_ACE) 

            Size:             0x0014 

            Access Mask:      0x000f003f (Full Control) 

            Sid:              S-1-5-12 (System) 

The command in the following example displays the security descriptor for the HKEY_LOCAL_MACHINE\SOFTWARE key.



 REG> LIST SECURITYDESCRIPTOR HKEY_LOCAL_MACHINE\SOFTWARE 

 

   Security Descriptor: 

 

      Revision:               0x01 

      Control:                0x8004 (SE_DACL_PRESENT, 

                                      SE_SELF_RELATIVE) 

      Owner Sid:              S-1-5-20-220 

      Group Sid:              S-1-5-20-220 

      Dacl: 

         Revision:            0x02 

         Size:                0x005c 

         Ace Count:           0x0004 

 

         Ace #1: 

            Type:             0x00 (ACCESS_ALLOWED_ACE_TYPE) 

            Flags:            0x03 (OBJECT_INHERIT_ACE, 

                                    CONTAINER_INHERIT_ACE) 

            Size:             0x0018 

            Access Mask:      0x000f003f (Full Control) 

            Sid:              S-1-5-20-220 

 

         Ace #2: 

            Type:             0x00 (ACCESS_ALLOWED_ACE_TYPE) 

            Flags:            0x03 (OBJECT_INHERIT_ACE, 

                                    CONTAINER_INHERIT_ACE) 

            Size:             0x0014 

            Access Mask:      0x000f003f (Full Control) 

            Sid:              S-1-3-0 

 

         Ace #3: 

            Type:             0x00 (ACCESS_ALLOWED_ACE_TYPE) 

            Flags:            0x03 (OBJECT_INHERIT_ACE, 

                                    CONTAINER_INHERIT_ACE) 

            Size:             0x0014 

            Access Mask:      0x0003001f (Query Value, Set Value, 

                                          Create Subkey, Enumerate 

                                          Subkeys, Notify, Delete, 

                                          Read Control) 

            Sid:              S-1-1-0 (World) 

 

         Ace #4: 

            Type:             0x00 (ACCESS_ALLOWED_ACE_TYPE) 

            Flags:            0x03 (OBJECT_INHERIT_ACE, 

                                    CONTAINER_INHERIT_ACE) 

            Size:             0x0014 

            Access Mask:      0x000f003f (Full Control) 

            Sid:              S-1-5-12 (System) 


LIST VALUE

Displays all values and value attributes of the specified key.

Note

Symbolic links are not followed.

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

LIST VALUE key-name


Parameters

key-name

Specifies the name of the key to enumerate.

Qualifiers

/DATA

Displays an ASCII representation of the value in hexadecimal format.

/FLAGS

Displays an ASCII representation of the data flag of the value in hexadecimal format.

/FULL

Displays all available information---that is, information displayed by the /TYPE_CODE, /LINK_PATH, /DATA_FLAGS, and /VALUE_DATA qualifiers.

/LINK_PATH

Displays the key path to which the subkey is linked.

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

/TYPE_CODE

Display the type code of the value.

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> LIST VALUE/TYPE_CODE/DATA HKEY_LOCAL_MACHINE\SOFTWARE\FORTRAN 

 

   Key name:            HKEY_LOCAL_MACHINE\SOFTWARE\FORTRAN 

   Security policy:     REG$K_POLICY_NT_40 

   Volatile:            REG$K_NONE 

   Last written:        11-AUG-1998 16:27:55.81 

 

   Value(s): 

 

     Value name:   Version 

     Volatile:     REG$K_NONE 

     Type:         REG$K_SZ 

     Data:         5.3-50 

 

     Value name:   Date Installed 

     Volatile:     REG$K_NONE 

     Type:         REG$K_SZ 

     Data:         04-Jan-1998 

The LIST VALUE/TYPE_CODE/DATA command in this example displays the FORTRAN key and its value names, types, and data.


MODIFY KEY

Modifies the attributes of the specified key.

Caution

Modifying a key results in symbolic links not being followed. This is because the system modifies the key you specify, not the key pointed to by the symbolic link.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

MODIFY KEY key-name


Parameters

key-name

Specifies the name of the key to modify.

Qualifiers

/CACHE_ACTION=value

Specifies the cache attribute for the new key. The value can be WRITEBEHIND (write to disk later) or WRITETHRU (write to disk immediately).

If you omit /CACHE_ACTION, the system creates the key with the cache attribute set to REG$K_WRITEBEHIND.

/CLASS_NAME=string

Specifies the new class name of the key.

/LINK=(TYPE=3Dvalue, NAME=key-name)

Defines the key as a link to another key. The link value must be one of the following:

To remove a link, enter the following:



/LINK=(TYPE=NONE,NAME="") 

/NEW_NAME=new-key-name

Specifies the new name of the key.

/SECPOLICY=policy

Defines the security policy for the key. Currently the only valid policy is NT_40 .

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG> MODIFY KEY/CACHE_ACTION=WRITEBEHIND 

HKEY_USERS\GUEST 

Modifies the cache attribute of the GUEST key.


MODIFY TREE

Modifies the information for the specified key and its subkeys.

Caution

Modifying a tree results in symbolic links not being followed. This is because the key and subkeys you specify are modified, not the key pointed to by the symbolic link.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

MODIFY TREE key-name


Parameters

key-name

Specifies the name of the key to modify.

Qualifiers

/CACHE_ACTION=value

Specifies the cache attribute for the key and its subkeys. The value can be WRITEBEHIND (write to disk later) or WRITETHRU (write to disk immediately).

/CLASS_NAME=string

Specifies the new class name for the given key and all its subkeys.

/SECPOLICY=policy

Defines the security policy for the key. Currently the only valid policy is NT_40 .

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG> MODIFY  TREE/CACHE_ACTION=WRITEBEHIND 

HKEY_USERS\GUEST 

Modifies the cache attribute of the GUEST key and all its subkeys.


MODIFY VALUE

Specifies the data component for the specified value. This command modifies an existing value.

Caution

Modifying a value results in symbolic links not being followed. This is because the system modifies the value you specified, not the value pointed to by the symbolic link.

This command requires the SYSPRV privilege or the REG$UPDATE rights identifier.


Format

MODIFY VALUE /NAME=string key-name


Parameters

key-name

Specifies the name of the key for which to set the value.

Qualifiers

/DATA=value

Specifies the data for the value. The value can be:

Note

You cannot specify the /INPUT qualifier with /DATA.

/FLAGS=flag

Specifies the data flags value. This is an application-dependent 64-bit flag specified as a decimal number or as a hexadecimal number preceded by 0x or %X.

/INPUT=filename

Specifies that the value data is to be read from a file.

The input value data can be specified in one of the following formats. With the exception of SZ, the format is specified by a keyword at the start of the file. The keyword can be entered in uppercase or lowercase. Input records following a keyword can span multiple lines; use "\" at the end of any continuation lines.

NOTES

/LINK=(TYPE=value, NAME=key-name)

Defines the key as a link to another key. The link value must be one of the following:

To remove a link, enter the following:



/LINK=(TYPE=NONE,NAME="") 

/NAME=string

Specifies the name of the value.

/TYPE_CODE=type

Specifies the type of the new value. The type value must be one of the following:

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

/WRITEBEHIND
/NOWRITEBEHIND (default)

Specifies when the information can be written to disk. /WRITEBEHIND specifies that the information can be written to disk later. /NOWRITEBEHIND specifies write-through operation (that is, the information must be written to disk immediately).

Examples



REG> MODIFY VALUE/DATA=COSMOS/TYPE=SZ/NAME=COMPUTERNAME 

HKEY_LOCAL_MACHINE\NODE

Creates COMPUTERNAME value for the key HKEY_LOCAL_MACHINE\NODE , and sets its type code to SZ and its data value to COSMOS .


SEARCH KEY

Displays the path name of all the keys that match the specified key.

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

SEARCH KEY key-search


Parameters

key-search

Specifies the key name for which to search.

Qualifiers

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> SEARCH KEY 

HKEY_LOCAL_MACHINE\...\NODE

HARDWARE\CLUSTER\NODE 

HARDWARE\LOCAL\NODE  

NODE  

Displays all the key paths that match the HKEY_LOCAL_MACHINE\...\NODE selection. The ellipsis (...) wildcard specifies that there can be any number of subkeys between the HKEY_LOCAL_MACHINE entry point and the NODE subkey. Note that the search is not case sensitive.


SEARCH VALUE

Displays the path name of all the values that match the specified value name.

This command requires the SYSPRV privilege or the REG$LOOKUP rights identifier.


Format

SEARCH VALUE key-name value-name


Parameters

key-name

Specifies the name of the key path to search.

value-name

Specifies the value name for which to search.

Qualifiers

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> SEARCH VALUE HKEY_LOCAL_MACHINE\... *AM%

HARDWARE\CLUSTER\Name  

HARDWARE\CLUSTER\NODE\Name  

HARDWARE\LOCAL\NODE\Name  

NODE\COMPUTERNAME  

Displays all the value names that match the HKEY_LOCAL_MACHINE\...\*am% selection. The ellipsis (...) wildcard specifies that there can be any number of subkeys between the HKEY_LOCAL_MACHINE entry point and the *am% value name. Note that the search is not case sensitive.


SHOW

Displays OpenVMS Registry server internal statistics and information.

This command requires the SYSPRV privilege or the REG$PERFORMANCE rights identifier.


Format

SHOW COUNTERS/FILE [name]

SHOW FILE [name]


Parameters

name

Identifies the file (used with the /FILE qualifier only).

Qualifiers

/FILE

Displays counters for the specified file or for all files.

/PERFORMANCE

Displays performance counters.

/OUTPUT=file-spec

Controls where the output of the command is sent. If you do not specify a file name, the system uses the default name REGISTRY.LIS .

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> SHOW COUNTERS/FILE

Displays monitoring information from the OpenVMS Registry server.



REG> SHOW COUNTERS/FILE REGISTRY$USERS 

Displays monitoring information for file REGISTRY$USERS from the OpenVMS Registry server.


SPAWN

Creates a subprocess of the current process. Portions of the current process context are copied to the subprocess. You can use the SPAWN command to temporarily leave REG$CP, perform other functions, then return to REG$CP.

Format

SPAWN [command-string]


Parameters

command-string

Command to be executed.

START MONITORING

Starts a monitoring component within the OpenVMS Registry server.

This command requires the SYSPRV privilege or the REG$PERFORMANCE rights identifier.


Format

START MONITORING/FILE [name]

START MONITORING/PERFORMANCE


Parameters

name

Identifies the file (used with the /FILE qualifier only).

Qualifiers

/FILE

Start gathering counters for the specified file or for all files.

/PERFORMANCE

Start gathering performance counters.

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> START MONITORING/PERFORMANCE

Enables a monitoring component of the OpenVMS Registry.


STOP MONITORING

Stops a monitoring component within the OpenVMS Registry server.

This command is used to stop a monitoring component within the OpenVMS Registry server.

This command requires the SYSPRV privilege or the REG$PERFORMANCE rights identifier.


Format

STOP MONITORING/FILE [name]

STOP MONITORING/PERFORMANCE


Parameters

name

Identifies the file (used with the /FILE qualifier only).

Qualifiers

/FILE

Stop gathering counters for the specified file or for all files.

/PERFORMANCE

Stop gathering performance counters.

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> STOP MONITORING/PERFORMANCE

Disables a monitoring component of the OpenVMS Registry.


WAIT

Waits for the specified number of seconds or waits for a random number of seconds within a range of seconds for command completion.

Format

WAIT [seconds]

WAIT [minimum-seconds maximum-seconds]


Parameters

seconds

Specifies the number of seconds that you are willing to wait.

minimum-seconds

Specifies the minimum amount of time, in seconds, that you are willing to wait.

maximum-seconds

Specifies the maximum amount of time, in seconds, that you are willing to wait.

ZERO COUNTERS

Initializes counters within the OpenVMS Registry server.

This command requires the SYSPRV privilege or the REG$PERFORMANCE rights identifier.


Format

ZERO COUNTERS/FILE [name]

ZERO COUNTERS/PERFORMANCE


Parameters

name

Identifies the file (used with the /FILE qualifier only).

Qualifiers

/FILE

Initializes the file counters for the specified file or for all files.

/PERFORMANCE

Initializes all performance counters.

/WAIT=seconds
/NOWAIT

Specifies the maximum amount of time, in seconds, that you are willing to wait for command completion. If the Registry server does not complete the request in the specified interval, REG$CP returns REG-F-NORESPONSE. The default interval is 90 seconds. /NOWAIT is equivalent to specifying /WAIT=0, but there may still be a short wait period.

Examples



REG> ZERO COUNTERS/PERFORMANCE

This example resets the performance counters.


Previous Next Contents Index