The command reg add in Windows
The reg add command adds new subkeys or entries to the registry.To learn more about how to use this command, see the example section below.
Syntax reg add command
reg add [{/ v ValueName | / ve}] [/ t DataType] [/ s Separator] [/ d Data] [/ f]
The command parameter reg add
Parameters
Describe
Specify the full path of the subkey or which entry will be added.To specify a remote computer, attach the computer name (in the format) as part of the KeyName parameter.In addition, the KeyName parameter must also include a valid root key.Valid root keys for local computers are: HKLM, HKCU, HKCR, HKU and HKCC.If the remote computer is specified, the valid original keys will be HKLM and HKU.
/ v
Specify the name of the registry entry to be added under the specified subkey.
/ ve
Specifies that the added entry to the registry will have a null value.
/ t
Only the type of entry to be added, must be one of the following:
REG_SZ
REG_MULTI_SZ
REG_DWORD_BIG_ENDIAN
REG_DWORD
REG_BINARY
REG_DWORD_LITTLE_ENDIAN
REG_LINK
REG_FULL_RESOURCE_DESCRIPTOR
REG_EXPAND_SZ
/S
Specifies the character used to separate multiple data versions when REG_MULTI_SZ data types are specified and multiple entries need to be listed.
/ d
Specify data for the new entry entry.
/ f
Add the register entry without sending a confirmation prompt.
/?
Show help at thecommand prompt.
Reg command comment add
This reg command does not require confirmation when adding a subkey.
The following table lists the return values during the execution of the reg add command:
Value
Meaning
0
Success
first
Failure
For keys of the type REG_EXPAND_SZ, use the caret symbol (^) with% "inside the / d parameter .
Example command reg add
To add HKLMSoftwareMyCo key on the ABC remote computer, type:
REG ADD ABCHKLMSoftwareMyCo
To add an entry to HKLMSoftwareMyCo with a value of type REG_BINARY and data is fe340ead , type:
REG ADD HKLMSoftwareMyCo / v Data / t REG_BINARY / d fe340ead
To add the multi-value registry entry to HKLMSoftwareMyCo with the value of MRU , REG_MULTI_SZ data and faxmail data, enter:
REG ADD HKLMSoftwareMyCo / v MRU / t REG_MULTI_SZ / d faxmail
To add an extended registry entry for HKLMSoftwareMyCo with a value of Path , data as REG_EXPAND_SZ and data is % systemroot% , enter:
REG ADD HKLMSoftwareMyCo / v Path / t REG_EXPAND_SZ / d ^% systemroot ^%
See more:
- The qprocess command in Windows
- Qappsrv (query termserver) command in Windows
- The quser (query user) command in Windows
- The pubprn command and the pushprinterconnections command in Windows
You should read it
May be interested
- Rd command in Windowsthe rd command helps delete a directory
- Cmd command in Windowsthe cmd command starts a new version of the command interpreter, cmd.exe. if used without parameters, cmd will display copyright information and the version of the operating system.
- How to use the command history function in Command Promptcommand prompt is an extremely familiar command for anyone using windows operating system. besides, a lot of current software also supports the command line to perform actions on the command prompt window, instead of on the screen.
- The sfc command in Windows(applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012)
- Reg command copy in Windowsto copy an entry to the location specified on the local pc or the remote computer we will use the reg copy command. to learn more about how to use the reg copy command, you can track the syntax, explain the command parameters and the example tipsmake.com has compiled below.
- Fc command in Windowsthe fc command compares two files or a collection of files and displays the differences between them.
- The echo command in Windowsthe echo command displays the message or turns on / off the command repeat feature. if used without parameters, the echo command will display the current echo setting.
- Xcopy command in Windowsthe xcopy command is a command prompt command used to copy one or more files or folders from one location to another. with many options and the ability to copy entire directories, the xcopy command is similar to, but much more powerful, than the copy command.
- The cacls command in Windowsthe cacls command displays or modifies an arbitrary access control list (dacl) on the specified file. the command applies to windows server (semi-annual channel), windows server 2016, windows server 2012 r2, windows server 2012.
- Clean command in Windowsthe clean command deletes all partitions or formats the volume from the current drive. the command applies to windows server (semi-annual channel), windows server 2019, windows server 2016, windows server 2012 r2, windows server 2012.