DEV Community

Victor James
Victor James

Posted on • Originally published at on

REGINI Command: Modifies Registry Permissions-RTP



The REGINI ** windows command-line tool is to **change the registry settings. Let us see about this command in detail with its syntax below.

CMD Line

CMD Line is a ** text-based interface** that transfers the command from the user to the OS.

CLI-Command Line Interpreter

The command-line interpreter (CLI) for windows is CMD.EXE. Also, you can use PowerShell, which can automate many system administration tasks and these tasks are not approachable in command prompt. With the help of the CLI, you can communicate with your system by typing the text in commands. As a result, your system answers to the text that you have typed previously, and then the user can proceed with the following command line that shows up.

To open the Run command Window.

Run command window helps you to run programs, open the files and folders. And there are several ways to open up the run command dialog box. This run command box is helpful for you to head straight to the destined program quickly.

By using the Keyboard shortcut Key:


One of the most commonly used methods is the shortcut key method. Also, this method is in all versions of Windows. It would help if you pressed the Windows+ R ** ** key concurrently to open the Run command dialog box.

Run command box
Run command box

What does the REGINI command do?

As we have mentioned previously, this command-line utility is to change the registry permissions. With the help of this command, you can modify the registry. One can create , change and remove the registry keys.


      REGINI [-m \\machinename] [-i n]
         [-o outputWidth][-b] textFiles...

      REGINI [-h hivefile hiveroot] [-i n]
         [-o outputWidth][-b] textFiles...

Enter fullscreen mode Exit fullscreen mode

Parameter Explanation

  • -m – This key indicates the ** remote computer** to be modified.
  • -h – Specifies the ** local hive** to manipulate.
  • -i n – Indicates the display ** indentation multiple**. Default is 4
  • -o output width – Indicates the *width of the command * output. By default, the output Width is set to the width of the console window unless standard output has been redirected to a file, in which case, 240 is used.
  • textFiles – This key indicates one or more *ANSI or Unicode text files * containing registry data.
  • -b – This key makes REGINI backward compatible with older versions of REGINI that did not strictly enforce line continuations and quoted strings. More specifically, REG_BINARY, REG_RESOURCE_LIST, and REG_RESOURCE_REQUIREMENTS_LIST data types *did not need line continuations after the first number * given the size of the data. It just kept looking at the following lines until it found enough data values to equal the data length or hit invalid input. Quoted strings were only allowed in REG_MULTI_SZ. They could not be specified around key or value names or values for REG_SZ or REG_EXPAND_SZ. Finally, the old REGINI did not support the semicolon as an end of line comment character.

REGINI command
REGINI command


  • The *semicolon * is the end of the line comment character. Giving it is the ** first non-black character ** on a line.
  • The backslash ** character line continuation character. If there is more than one space before the backslash character, it will be **substituted with a single space.
  • Indentation ** is used to specify the **tree structure of the registry keys. For that, you can use hard tab characters and embedded hard characters regardless of their position, and it is changed into a ** single space.**
  • Before child keys , we should place the values because they are related to the previous key or the above value’s indentation level.

Key Names

Embedded spaces are considered as the key name, and until or unless leading or trailing characters are enclosed with ** double quotes** , it is not treated as key names.

ACL ** (Access Control List) is a series of *decimal numbers * separated with spaces and square characters, and we can follow the key names ** with an ACL.

Valid numbers and their meanings

The valid numbers and their meanings are as follows,

| 1 | Administrators Full Access |
| 2 | Administrators Read Access |
| 3 | Administrators Read and Write Access |
| 4 | Administrators Read, Write and Delete Access |
| 5 | Creator Full Access |
| 6 | Creator Read and Write Access |
| 7 | World Full Access |
| 8 | World Read Access |
| 9 | World Read and Write Access |
| 10 | World Read, Write and Delete Access |
| 11 | Power Users Full Access |
| 12 | Power Users Read and Write Access |
| 13 | Power Users Read, Write and Delete Access |
| 14 | System Operators Full Access |
| 15 | System Operators Read and Write Access |
| 16 | System Operators Read, Write and Delete Access |
| 17 | System Full Access |
| 18 | System Read and Write Access |
| 19 | System Read Access |
| 20 | Administrators Read, Write and Execute Access |
| 21 | Interactive User Full Access |
| 22 | Interactive User Read and Write Access |
| 23 | Interactive User Read, Write and Delete Access |

  • In case if there is an ** equal sign** on the same line as the left square bracket, the ** equal sign takes priority** , and it is considered a registry value.
  • Spaces on both sides of the equal sign and the spaces in the keywords are ignored. Unlike if quotes surround them, they will be treated.
  • Empty value ** can be indicted with **@ character as like
  • @ = data

Valid Value Types and data

   REG_SZ text
   REG_MULTI_SZ "string1" "str""ing2" ...
   REG_DATE mm/dd/yyyy HH:MM DayOfWeek
   REG_BINARY numberOfBytes numberDWORD(s)...
   REG_NONE (same format as REG_BINARY)
   REG_RESOURCE_LIST (same format as REG_BINARY)

Enter fullscreen mode Exit fullscreen mode

The value will be REG-SZ text if no value is defined.

  • In the ** REG_SZ text** , REG_EXPAND_SZ text , surround them with *quotes * if you want trailing spaces.
  • In the case of REG_MULTI_SZ , every component string ** has to be enclosed with **quotes.
  • For REG_BINARY , which contains one or more numbers and by default, the base is decimal. And it can be mentioned like ** 0× prefix**.

We have given the rules in detail in the image below,

Rules for the command
Rules for the command

  • The prefix strings mentioned below can be utilized while citing a registry path either on the ** input file** or in the command line.

   Each of these strings can stand alone as the key name or be followed
   a backslash and a subkey path.

Enter fullscreen mode Exit fullscreen mode


  • To permit administrators with reading and write access to an HKLM registry key on admin1, use

C:\> RegIni -m \\admin1 regdemo.txt

Enter fullscreen mode Exit fullscreen mode


Through this article, you would have learned about the REGINI command with examples. For more Windows commands, check out our webpage.

Related Articles

The post REGINI Command: Modifies Registry Permissions-RTP appeared first on Windows Commands- SS64 Commands.

Discussion (0)