CmdID

CmdID / Commands / reg

reg add

Adds a new subkey or entry to the registry. Windows commands reference

On Windows

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from the Windows commands reference, CC BY 4.0
reg add <keyname> [/v valuename | /ve] [/t datatype] [/s separator] [/d data] [/f] [/reg:32 | /reg:64]
reg add \\ABC\HKLM\Software\MyCo
reg add HKLM\Software\MyCo /v Data /t REG_BINARY /d fe340ead
reg add HKLM\Software\MyCo /v MRU /t REG_MULTI_SZ /d fax\0mail\0
reg add HKLM\Software\MyCo /v Path /t REG_EXPAND_SZ /d ^%systemroot^%
<keyname>Specifies the full path of the subkey or entry to be added. To specify a remote computer, include the computer name (in the format \<computername>\) as part of the keyname. Omitting \<computername>\ causes the operation to default to the local computer. The keyname must include a valid root key. Valid root keys for the local computer are: - HKCR (HKEY_CLASSES_ROOT) - HKCU (HKEY_CURRENT_USER) - HKLM (HKEY_LOCAL_MACHINE) - HKU (HKEY_USERS) - HKCC (HKEY_CURRENT_CONFIG) If a remote computer is specified, valid root keys are: HKLM and HKU. If the registry key name contains a space, enclose the key name in quotes.
/v <Valuename>Specifies the name of the add registry entry.
/veSpecifies that the added registry entry has a null value.
/t <Type>Specifies the type for the registry entry. Type 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 <Separator>Specifies the character to be used to separate multiple instances of data when the REG_MULTI_SZ data type is specified and more than one entry is listed. If not specified, the default separator is \0.
/d <Data>Specifies the data for the new registry entry.
/fAdds the registry entry without prompting for confirmation.
/reg:32Specifies the key should be accessed using the 32-bit registry view.
/reg:64Specifies the key should be accessed using the 64-bit registry view.
/?Displays help at the command prompt.
0Success
1Failure