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 is a ** text-based interface** that transfers the command from the user to the OS.
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.
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.
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...
- -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.
- 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.
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.
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
REG_SZ text REG_EXPAND_SZ text REG_MULTI_SZ "string1" "str""ing2" ... REG_DATE mm/dd/yyyy HH:MM DayOfWeek REG_DWORD numberDWORD REG_BINARY numberOfBytes numberDWORD(s)... REG_NONE (same format as REG_BINARY) REG_RESOURCE_LIST (same format as REG_BINARY) REG_RESOURCE_REQUIREMENTS (same format as REG_BINARY) REG_RESOURCE_REQUIREMENTS_LIST (same format as REG_BINARY) REG_FULL_RESOURCE_DESCRIPTOR (same format as REG_BINARY) REG_QWORD numberQWORD REG_MULTISZ_FILE fileName REG_BINARYFILE fileName
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,
- The prefix strings mentioned below can be utilized while citing a registry path either on the ** input file** or in the command line.
HKEY_LOCAL_MACHINE HKEY_USERS HKEY_CURRENT_USER USER: Each of these strings can stand alone as the key name or be followed a backslash and a subkey path.
- To permit administrators with reading and write access to an HKLM registry key on admin1, use
C:\> RegIni -m \\admin1 regdemo.txt
Through this article, you would have learned about the REGINI command with examples. For more Windows commands, check out our webpage.
- RMDIR Command: Deletes a Directory The RMDIR Windows command-line tool is used to delete a directory. RMDIR command helps you to delete the directory mentioned by the Directory parameter.
- RMTSHARE Command: Shares a Folder or a Printer The RMTSHARE command-line utility tool manages the files, and the printer shares or on a local or a remote server.
- REGINI Command: Modifies Registry Permissions-RTP The REGINI command-line utility is to change the registry permissions. With the help of this command, you can modify the registry.
- REGSVR32 Command: Registers/Unregisters a DLL The REGSRV32 windows command-line tool is to register or unregister a DLL.
- REGEDIT Command: Import/Exports Registry Settings The REGEDIT windows command-line tool is to import and export registry settings.