REGINI – Windows CMD Command

Change Registry Permissions.

o understand the format of the input textFile use the REGDMP command (22,288 bytes, Windows 2000 Resource Kit) with no arguments to dump the current contents of the registry to standard out. Redirect standard out to a file and this file is acceptable as input to REGINI.
regdmp HKEY_CURRENT_USER >hkcu.txt

The REGDMP utility has not been supplied with any versions of Windows or any Resource Kits since Windows 2000, the likely expectation is that most people will now use PowerShell (Get-ACL and Set-ACL) for this, the new commands are widely available and much easier to use.

Some general rules are:
Semicolon character is an end-of-line comment character, provided it is the first non-blank character on a line

Backslash character is a line continuation character. All characters from the backslash up to but not including the first non-blank character of the next line are ignored. If there is more than one space before the line continuation character, it is replaced by a single space.

Indentation is used to indicate the tree structure of registry keys The REGDMP program uses indentation in multiples of 4. You can use hard tab characters for indentation, but embedded hard tab characters are converted to a single space regardless of their position

Values should come before child keys, as they are associated with the previous key at or above the value’s indentation level.

For key names, leading and trailing space characters are ignored and not included in the key name, unless the key name is surrounded by quotes. Imbedded spaces are part of a key name.

If there is an equal sign on the same line as a left square bracket then the equal sign takes precedence, and the line is treated as a registry value. If the text between the square brackets is the string DELETE with no spaces, then REGINI will delete the key and any values and keys under it.

Leading spaces, spaces on either side of the equal sign and spaces between the type keyword and data are ignored, unless the value name
is surrounded by quotes. If the text to the right of the equal sign is the string DELETE, then REGINI will delete the value.

The value name can be left out or be specified by an @ character which will resolve to an empty value name.
The following two lines are identical:

= type data
@ = type data

This syntax means that you can’t create a value with leading or trailing spaces, an equal sign or an @ in the value name, unless you put the name in quotes.

For REG_SZ and REG_EXPAND_SZ, if you want leading or trailing spaces in the value text, surround the text with quotes. The value text can contain any number of imbedded quotes, and REGINI will ignore them, as it only looks at the first and last character for quote characters.

For REG_MULTI_SZ, each component string is surrounded by quotes. If you want an imbedded quote character, then double quote it, as in string2 above.

For REG_BINARY, the value data consists of one or more numbers The default base for numbers is decimal. Hexidecimal can be specified by using 0x prefix. The first number is the number of data bytes, excluding the first number. After the first number must come enough numbers to fill the value. Each number represents one DWORD or 4 bytes. So if the first number was 0x5 you would need two more numbers after that to fill the 5 bytes. The high order 3 bytes
of the second DWORD would be ignored.

Whenever specifying a registry path, either on the command line or in an input file, the following prefix strings can be used:

You may also like...

1 Response

  1. zortilo nrel says:

    Thanks for another fantastic article. The place else may just anyone get that kind of info in such an ideal manner of writing? I have a presentation next week, and I am on the search for such information.

Leave a Reply

Your email address will not be published. Required fields are marked *