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 bug #37

Closed
Lucane opened this issue Oct 8, 2020 · 6 comments
Closed

Registry bug #37

Lucane opened this issue Oct 8, 2020 · 6 comments
Labels
question Further information is requested

Comments

@Lucane
Copy link

Lucane commented Oct 8, 2020

I have an issue with the script that I can't seem to figure out. The short version of it is that the script successfully creates the necessary registry keys, but no shell entries are created and the keys don't show up in the Registry Editor.

I checked that the keys aren't created under Wow6432node (as they would if they were created in a 32-bit application) and that Powershell is running in 64-bit (which it is):

PS C:\Users\Avalerion\Desktop> [Environment]::Is64BitProcess
True

The interesting thing is that when I use the following command, PowerShell retrieves the correct value:

PS C:\> Get-ItemProperty -Path "HKCU:\SOFTWARE\Classes\Directory\shell\MenuTerminal" | Select-Object -ExpandProperty MUIVerb
Windows Terminal here

And yet, they key doesn't show up in the Registry Editor:
Screenshot 2020-10-08 040014

I also used the Registry Editor's search function to search for the keys, but didn't find a match.
Anybody have an idea what might be going on here?

@lextm
Copy link
Owner

lextm commented Oct 8, 2020

You can monitor registry keys via tools like Process Monitor, so debugging further and the cause should reveal itself.

@lextm lextm added the up for grab Extra attention is needed label Oct 8, 2020
@Lucane
Copy link
Author

Lucane commented Oct 9, 2020

I used ProcMon and everything seemed to match up. I also enabled registry auditing and everything showed as expected.
What I found, is that I could create and remove keys with Powershell 5 and they show up in the registry just fine.

It turns out, the MS Store release of Powershell 7 was the culprit. I have no clue why that would be the case, but when I downloaded the release from GitHub and installed that, everything worked just fine.

This is so bizarre, but I guess my issue is solved now. I installed it from the Store out of pure laziness, but clearly that was a mistake 😄

@lextm
Copy link
Owner

lextm commented Oct 9, 2020

@Lucane What is "MS Store release of PowerShell 7"? Do you refer to this?

@Lucane
Copy link
Author

Lucane commented Oct 9, 2020

Yeah, that's the one. As far as I could tell, it should include the latest release available on GitHub.

@lextm
Copy link
Owner

lextm commented Oct 9, 2020

Not quite familiar with the Store app model, but based on several sources such apps do not have full access to Windows registry (but a virtual one), so any changes made by them do not apply to your Windows installation machine-wide. That can be the cause.

https://stackoverflow.com/questions/34694059/read-write-registery-key-file-in-uwp

@lextm lextm added question Further information is requested and removed up for grab Extra attention is needed labels Oct 9, 2020
@Lucane
Copy link
Author

Lucane commented Oct 9, 2020

That would certainly explain the symptoms I was having. It does seem peculiar as to why Microsoft would publish it on the Store if it suffers from these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants