microsoft / microsoft/PowerToys
[Registry Preview] Support metadata directives in .reg comments
- Dominant language
- C
- Stars
- 139k
- Forks
- 8.6k
- PR merge metrics
- PR metrics pending
Description
### Description of the new feature / enhancement
Registry Preview already parses .reg files before import. It could recognize
optional metadata stored in comment lines, such as `;Title=`, `;Description=`,
`;Author=` and `;Requires=`, and display this information to the user before/after import.
Example:
```
Windows Registry Editor Version 5.00
;Title=Example Tweak
;Description=A short human-readable description of what this .reg file does.
;Requires=ExplorerRestart
;Author=John Doe
[HKEY_CURRENT_USER\Software\Classes\CLSID\...]
<...>
```
Registry Preview could display something like:
- Title: Example Tweak
- Description: A short human-readable description of what this .reg file does.
- Additional action required after import: Restart Windows Explorer
Supported Requires values (initial set):
```
;Requires=ExplorerRestart
;Requires=Restart
;Requires=Logoff
```
Unknown `;Key=Value` directives would be silently ignored, so the set can grow later without breaking older files. This is entirely optional - files without this metadata continue to work exactly as they do today.
### Scenario when this would be used?
.reg files are commonly shared on forums, in guides, and between admins/power users. Comments (;) have existed in the .reg format for decades, but they have no dedicated UI surface - Registry Preview currently shows them only as raw text in the left-hand text panel, alongside the rest of the file content, competing for attention with the actual registry syntax. Most users focus on the right-hand tree view, which shows structure but not comments at all.
Someone double-clicking a .reg file never sees the text content, and even users who do open Registry Preview tend to skim the raw text panel rather than read it closely - it reads as "technical detail," not as user-facing
information.
Surfacing recognized metadata (Title/Description/Requires) in a dedicated, prominent panel - rather than leaving it buried in the raw text - would make this context something users actually see and act on, not just something that's technically present in the file.
### Supporting information
100% backward compatible — no changes to the .reg file format, existing Regedit versions already ignore comment lines.
Possible implementation: parse lines matching `;Key=Value` before the first
`[Section]`, store as a metadata dictionary, render in a collapsible info
panel above/alongside the tree view.
Contributor guide
Research direction
Start by locating the Registry Preview entry points for .reg parsing and the right-hand tree-view UI. Check how comment lines are currently handled, then determine where recognized metadata and the Requires actions would fit in a collapsible panel. Done means optional directives are surfaced without changing behavior for files that lack them.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100