windows 注册文件格式
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/334207/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Regedit file format
提问by doekman
I would like to document the file format of regedit utility, so data can be merged into the registry.
我想记录 regedit 实用程序的文件格式,以便可以将数据合并到注册表中。
From the command-line you can (silently) merge data from a batch file like this:
从命令行,您可以(静默)合并来自批处理文件的数据,如下所示:
regedit /s file.reg
Exporting from a subkey goes like this:
从子项导出是这样的:
regedit /e file.reg "HKEY_XX\key"
回答by doekman
Remove keys and values by using the minus sign (-).
使用减号 (-) 删除键和值。
REGEDIT4
[-HKEY_CURRENT_USER\RemoveThisTree]
[HKEY_CURRENT_USER\RemoveValue]
"valueName"=-
References
参考
Minus sign to delete mentioned here: MSKB310516: How to add, modify, or delete registry subkeys and values by using a .reg file(Archived here.)
Minus sign to delete, semicolon to comment and IF/ENDIF mentioned here: MSDN: Registry File (Compact 2013)(Archived here.)
此处提到的要删除的减号:MSKB310516:如何使用 .reg 文件添加、修改或删除注册表子项和值(存档在此处。)
减号删除,分号评论和这里提到的 IF/ENDIF:MSDN:注册表文件(Compact 2013)(存档在这里。)
回答by P Daddy
Documenting the .reg file format is really more Microsoft's job.
记录 .reg 文件格式实际上更像是Microsoft 的工作。