/sys$common/syshlp/REGCP$HELP.HLB  —  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

    key-name

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

1  –  Qualifiers

1.1    /DATA

    /DATA=value

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

    o  A string (for example, /DATA=COSMOS)

    o  An array of strings separated by a comma and enclosed in
       parentheses (for example, /DATA=(COSMOS,Noidea)

    o  A longword in binary, octal, decimal, or hexadecimal format.
       %B, %O, %D, and %X, or 0B, 0O, 0D, and 0X prefixes specify
       the format.  The default is decimal.

       Examples: /DATA=%X1A0FCB (hex)
                 /DATA=0X1A0FCB (hex)
                 /DATA=%D1234 (decimal)
                 /DATA=1234 (decimal, by default)

                               NOTE

       If you specify /DATA, you cannot specify the /INPUT qualifier.

1.2    /FLAGS

    /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.

1.3    /INPUT

    /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.

         o SZ: a null-terminated Unicode string

           Enter SZ data by enclosing the record in quotes. You do
           not specify an SZ keyword for this input value type.
           You cannot continue the quoted string to a second line.

               "This is Unicode Data."

         o DWORD: A 32-bit number.

           The data following the DWORD keyword is interpreted as
           a single, 32-bit value.  It can be entered as a single
           value or as a list of values, separated by commas, with
           the least significant value first, provided the total
           is 32 or fewer bits.

           For example, the following valid specifications are
           equivalent:

               dword:44332211   DWORD:11,22,33,44   Dword:2211,4433

           The following specifications are invalid because the total
           always exceeds 32 bits:

               dword:5544332211
               dword:11,22,33,44,55
               dword:2211,554433

         o EXPAND_SZ: A string of Unicode characters.  The data
           following the EXPAND_SZ keyword is interpreted as a list
           of 4-byte Unicode values. For example:

               expand_sz:43,44,45

           This example stores the Unicode string "CDE".

         o MULTI_SZ: A concatenated array of SZ strings.  The data
           following the MULTI_SZ keyword is interpreted as a list of
           4-byte Unicode values, specifying two or more terminated SZ
           strings. For example:

             MULTI_SZ:52,61,69,6e,00,53,6c,65,65,74,00,53,6e,6f,77,00

           This example stores the Unicode strings "Rain", "Sleet", and
           "Snow".

         o HEX: Binary data.  The data following the HEX keyword is
           interpreted as a list of hex values.  For example:

               HEX:0F,C0,F0,FF

         o DEC: Binary data.  The data following the DEC keyword is
           interpreted as a list of decimal values.  For example:

               DEC:15,192,240,255

         o OCT: Binary data.  The data following the OCT keyword is
           interpreted as a list of octal values.  For example:

               OCT:17,300,360,377

         o BIN: Binary data.  The data following the BIN keyword is
           interpreted as a list of binary values.  For example:

               BIN:1111,11000000,11110000,11111111

                                 NOTES

    o  The input format is similar to the IMPORT and EXPORT file format.

    o  The input data type is independent of the data storage type, which
       is specified by the /TYPE_CODE qualifier.

    o  When you specify a binary input type (HEX, DEC, OCT or BIN)
       for each value in the record, the data is stored in the fewest
       bytes possible.  No alignment is performed.  To insure proper
       alignment, always enter any list of values as byte values.
       This input should be a stream of byte values, with the
       least significant byte first.  For example:

       DEC:253,    254,    255,    256, 257   (bytes/words, unaligned)
       DEC:253, 0, 254, 0, 255, 0, 256, 257   (bytes/words, word aligned)
       DEC:253, 0, 254, 0, 255, 0, 0, 1, 0, 2 (byte stream, word aligned)

    o  The input and storage types must be compatible. For example,
       you cannot specify value type DWORD (which means that the
       stored data is 4 bytes) and then input the SZ string "A"
       because then the SZ string would consist of the character
       00000041 and the terminator 00000000, which cannot fit in a
       DWORD. Attempting this will result in a REG-E-INVDATA error.
       However, specifying an empty string ("") does work and stores
       just the terminator.  Conversely, the input type DWORD specifies
       an input data length of 4 bytes.  You cannot specify value type
       SZ and input type DWORD:00000041 because SZ strings must be
       terminated.  The only valid DWORD you can enter in this case is
       00000000.

    o  When specifying /INPUT, you cannot specify the /DATA qualifier.

1.4    /LINK

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

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

      o  SYMBOLICLINK

      o  NONE

    To remove a link, enter the following:

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

1.5    /NAME

    /NAME=string

    Specifies the name of the value.

1.6    /TYPE_CODE

    /TYPE_CODE=type

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

    o  SZ: a null-terminated Unicode string

    o  EXPAND_SZ: a string of Unicode characters

    o  MULTI_SZ: a concatenated array of SZ strings

    o  DWORD: a 32-bit number

    o  BINARY: raw binary data

1.7    /WAIT

    /WAIT=seconds (default = 90)
    /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.

1.8    /WRITEBEHIND

    /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).

2  –  Example

 REG> MODIFY VALUE/DATA=COSMOS/TYPE=SZ/NAME=COMPUTERNAME -
 _REG> HKEY_LOCAL_MACHINE\NODE

      This example creates the COMPUTERNAME value for the key
      HKEY_LOCAL_MACHINE\NODE, and sets its type code to SZ
      and its data value to "COSMOS".
Close Help