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
- Del command in Windows
- Set command in Windows
- Cmd command in Windows
- Command at in Windows
- Fc command in Windows
- The echo command in Windows
- Bitsadmin getdisplayname and bitsadmin geterror command in Windows
- Reg command copy in Windows
- Rem command in Windows
- Doskey command in Windows
- Exit command in Windows
- Rd command in Windows
Maybe you are interested
9 Apps to Add to Control Center iOS 18
How to add Shutdown desktop shortcut in Windows 11
Windows 11 has added new Timer and Countdown clock widgets, what's noteworthy?
5 things to know before adding mods to your game
The entire iPhone 16 lineup adds support for faster Wi-Fi 7
How to add additional storage to Xbox Series X