2018-01-19 11:02:47 +00:00
|
|
|
# reg add
|
|
|
|
|
|
|
|
> Add new keys and their values to the registry.
|
2022-10-04 16:06:23 +01:00
|
|
|
> More information: <https://learn.microsoft.com/windows-server/administration/windows-commands/reg-add>.
|
2018-01-19 11:02:47 +00:00
|
|
|
|
|
|
|
- Add a new registry key:
|
|
|
|
|
|
|
|
`reg add {{key_name}}`
|
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Add a new [v]alue under a specific key:
|
2018-01-19 11:02:47 +00:00
|
|
|
|
|
|
|
`reg add {{key_name}} /v {{value}}`
|
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Add a new value with specific [d]ata:
|
2018-01-19 11:02:47 +00:00
|
|
|
|
|
|
|
`reg add {{key_name}} /d {{data}}`
|
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- Add a new value to a key with a specific data [t]ype:
|
2018-01-19 11:02:47 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
`reg add {{key_name}} /t REG_{{SZ|MULTI_SZ|DWORD_BIG_ENDIAN|DWORD|BINARY|DWORD_LITTLE_ENDIAN|LINK|FULL_RESOURCE_DESCRIPTOR|EXPAND_SZ}}`
|
2018-01-19 11:02:47 +00:00
|
|
|
|
2024-03-07 04:45:02 +00:00
|
|
|
- [f]orcefully (without a prompt) overwrite the existing registry value:
|
2018-01-19 11:02:47 +00:00
|
|
|
|
|
|
|
`reg add {{key_name}} /f`
|