Files
tldr/pages.zh/windows/reg-add.md

24 lines
664 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# reg add
> 向注册表添加新键及其值。
> 更多信息:<https://learn.microsoft.com/windows-server/administration/windows-commands/reg-add>。
- 添加一个新的注册表键:
`reg add {{key_name}}`
- 在特定键下添加一个新的[v]alue
`reg add {{key_name}} /v {{value}}`
- 添加一个具有特定[d]ata的新值
`reg add {{key_name}} /d {{data}}`
- 向具有特定数据[t]ype的键添加一个新值
`reg add {{key_name}} /t REG_{{SZ|MULTI_SZ|DWORD_BIG_ENDIAN|DWORD|BINARY|DWORD_LITTLE_ENDIAN|LINK|FULL_RESOURCE_DESCRIPTOR|EXPAND_SZ}}`
- [f]orcefully无提示覆盖现有的注册表值
`reg add {{key_name}} /f`