Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Registry Preview: allow pasting a registry key without saving it to a file #36872

Open
marypcbuk opened this issue Jan 14, 2025 · 7 comments
Open
Assignees
Labels
Cost-Small Small work item - 0-8 hours of work Idea-Enhancement New feature or request on an existing product Product-Registry Preview Refers to the Registry Preview PowerToy

Comments

@marypcbuk
Copy link

Description of the new feature / enhancement

Instead of opening a .REG file, it would be useful to be able to paste the Registry key in directly to preview it. A Paste... button next to the Open... button that popped up a window into which you could paste one or more registry keys would simplify the workflow of adding a new key.

Scenario when this would be used?

Many sites, including Microsoft Learn, provide registry keys to change OS or application behaviour as content that can be clipped - Learn even has a Copy button to copy these keys.

Image
To use the key in Registry Preview you currently have to save it to a file (remembering to add Windows Registry Editor Version 5.00 to the beginning of the file by hand) and then load it. It would be much quicker to have a Paste button and be able to preview the key without creating, saving and opening a file.

Supporting information

No response

@marypcbuk marypcbuk added the Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams label Jan 14, 2025
@htcfreek
Copy link
Collaborator

htcfreek commented Jan 14, 2025

@marypcbuk
This should be possible. You can open Registry Preview as standalone window and paste the clipboard content into the file content control of the window. Then it should preview the content after you added the "Registry Editor 5.0" string.

As improvement suggestion: Would it fit your needs if you are able to start the app with an empty registry file template containing only the "Registry Editor 5.0" string? /Needinfo


Note to me: Update "src/modules/registrypreview/RegistryPreviewUILib/RegistryPreviewMainPage.Utilities.cs".
Note to me 2: Maybe better add to "src/modules/registrypreview/RegistryPreviewUILib/Assets/RegistryPreview/index.html#L44C13-L48C16" for correct cursor position.

@htcfreek htcfreek added Idea-Enhancement New feature or request on an existing product Product-Registry Preview Refers to the Registry Preview PowerToy labels Jan 14, 2025
@htcfreek htcfreek self-assigned this Jan 14, 2025
@marypcbuk
Copy link
Author

start the app with an empty registry file template containing only the "Registry Editor 5.0" string?

that would be a great way of doing it - maybe a Paste or New button could add that automatically and the UI could give you a hint that you can just paste into that file content panel, because despite the blinking caret and the cursor changing to a text cursor over the control, I obviously didn't work out that it was a live, editable window!

@htcfreek htcfreek added Cost-Small Small work item - 0-8 hours of work and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 15, 2025
@marypcbuk
Copy link
Author

having experimented with this a little further, it seems that while you can paste the key you want to add into the file content control, you still have to save the contents of that control as a file before being able to actually write it to the registry, so there is still a step that it might be possible to remove in future to get a faster workflow (although I absolutely get encouraging people to save a file as a record of edits they've made to the registry, in case they need to go do troubleshooting)

@htcfreek
Copy link
Collaborator

Wondering if we should init like this instead of only the header string:

Image

@marypcbuk
Copy link
Author

my immediate thought is 'is it messy to select and delete that when I have a key ready to paste in that I got from a site like Microsoft Learn?' because I don't want to leave a random bit of cruft in there if I don't select carefully, but definitely something that tells the user they can paste

@htcfreek
Copy link
Collaborator

my immediate thought is 'is it messy to select and delete that when I have a key ready to paste in that I got from a site like Microsoft Learn?' because I don't want to leave a random bit of cruft in there if I don't select carefully, but definitely something that tells the user they can paste

Fair point. So this would be the best?

Image

@marypcbuk
Copy link
Author

that looks like a really good start!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cost-Small Small work item - 0-8 hours of work Idea-Enhancement New feature or request on an existing product Product-Registry Preview Refers to the Registry Preview PowerToy
Projects
None yet
Development

No branches or pull requests

2 participants