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

[Run][Service plugin] System.UnauthorizedAccessException: Access to the registry key [...] is denied. #11216

Closed
1 task done
latere-a-latere opened this issue May 12, 2021 · 13 comments
Assignees
Labels
Issue-Bug Something isn't working Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT)

Comments

@latere-a-latere
Copy link

latere-a-latere commented May 12, 2021

Microsoft PowerToys version

0.37.2 - 0.41.3.0

Running as admin

  • Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

  1. Install PowerToys
  2. Start PowerToys
  3. Open PowerToys Settings OR press Alt+Space to initiate PowerToys Run

image
Full error:

Version: 0.37.2.0
OS Version: Microsoft Windows NT 10.0.19042.0
IntPtr Length: 8
x64: True
Date: 12-5-2021 09:24:00
Exception:
System.UnauthorizedAccessException: Access to the registry key 'HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{dd5cacda-7c2e-4997-a62a-04a597b58f76}\LocalServer32' is denied.
   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
   at Microsoft.Win32.RegistryKey.CreateSubKeyInternalCore(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
   at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey, RegistryKeyPermissionCheck permissionCheck, RegistryOptions registryOptions)
   at Microsoft.Win32.RegistryKey.CreateSubKey(String subkey)
   at Microsoft.Toolkit.Uwp.Notifications.DesktopNotificationManagerCompat.RegisterComServer[T](String exePath)
   at Microsoft.Toolkit.Uwp.Notifications.DesktopNotificationManagerCompat.RegisterAumidAndComServer[T](String aumid)
   at Wox.PublicAPIInstance..ctor(SettingWindowViewModel settingsVM, MainViewModel mainVM, ThemeManager themeManager)
   at PowerLauncher.App.<>c__DisplayClass14_0.<OnStartup>b__0()
   at Wox.Infrastructure.Stopwatch.Normal(String message, Action action)
   at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e)
   at System.Windows.Application.OnStartup(StartupEventArgs e)
   at System.Windows.Application.<.ctor>b__1_0(Object unused)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)


Log (replaced username with User): 2021-05-12.txt

✔️ Expected Behavior

The settings window without an error popping up

❌ Actual Behavior

PowerToys Run appears to experience a fatal error. Opening settings again doesn't cause any further errors and while Alt + Space does bring up PowerToys Run, it is not functional and doesn't show any results.

Other Software

No response

@latere-a-latere latere-a-latere added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels May 12, 2021
@enricogior enricogior added Run-Plugin Things that relate with PowerToys Run's plugin interface and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels May 12, 2021
@enricogior enricogior changed the title "System.UnauthorizedAccessException: Access to the registry key [...] is denied. [Run][Service plugin] System.UnauthorizedAccessException: Access to the registry key [...] is denied. May 12, 2021
@enricogior
Copy link
Contributor

@marnicgit
thanks for reporting the issue.

@mykhailopylyp
Copy link
Contributor

@marnicgit
Right-click on the PowerToys icon in the tray menu and select Report Bug
image
Drag and drop report into a GitHub comment.

@latere-a-latere
Copy link
Author

@mykhailopylyp Here you go:
PowerToysReport_2021-05-12-19-45-45.zip

Please note that I did a bulk replace on the logs to remove my username.

@mykhailopylyp
Copy link
Contributor

mykhailopylyp commented May 13, 2021

@marnicgit
If you don't run as admin does the same issue happen?
Do you have multiple users on your system?

@mykhailopylyp
Copy link
Contributor

From logs:

[2021-04-14 11:18:01.723609] [p-18668] [t-18532] [trace] Starting PowerToys Run from elevated process
[2021-04-14 11:18:01.723665] [p-18668] [t-18532] [error] Failed to start PowerToys Run

The user experienced #10400.

@latere-a-latere
Copy link
Author

@marnicgit
If you don't run as admin does the same issue happen?
Do you have multiple users on your system?

The same issue occurs when I don't run as admin. I only have one user on my system (other than service accounts, IIS, etc.) though I should mention that I previously had a different user on my machine which I migrated to an AD account using ForensiT's Domain Migration tool somewhere in march. I don't remember the error popping up before the last update though.

@mykhailopylyp mykhailopylyp added Product-PowerToys Run Improved app launch PT Run (Win+R) Window and removed Run-Plugin Things that relate with PowerToys Run's plugin interface labels May 14, 2021
@mykhailopylyp
Copy link
Contributor

We should verify if we need the following line and should we crash when it fails.

DesktopNotificationManagerCompat.RegisterAumidAndComServer<LauncherNotificationActivator>("PowerToysRun");

In general, we should review PublicAPIInstance.cs

@enricogior
Copy link
Contributor

@mykhailopylyp
if I'm not mistaken, that is only used for the Service plugin, to open a toast notification after starting/stopping a service.

@latere-a-latere
Copy link
Author

latere-a-latere commented Jun 29, 2021

Hey, just wanted to update this issue and mention that I am still experiencing the error under 0.41.3.0. The exception remains the same.
image

@davidegiacometti
Copy link
Collaborator

With #12285 merged, Microsoft.Toolkit.Uwp.Notifications library will be removed.
Let's see if will fix this issue.

@jaimecbernardo
Copy link
Collaborator

Hi @marnicgit ,

If you open the Registry Editor, navigate to HKEY_CURRENT_USER\SOFTWARE\Classes\CLSID\{dd5cacda-7c2e-4997-a62a-04a597b58f76}\LocalServer32 and right click to check the permissions.
In normal conditions, your user, the System account and Administrators would have access to it, inherited from CURRENT_USER\Software\Classes.

Perhaps the domain migration tool misconfigured some registry keys.

@latere-a-latere
Copy link
Author

@jaimecbernardo You might be onto something:
image

I'm guessing that this is mostly my computer being borked rather than a hard bug in Run, but I'll keep the issue open until I've tested out the merge of #12285.

@jaimecbernardo jaimecbernardo added the Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT) label Aug 26, 2021
@jaimecbernardo jaimecbernardo self-assigned this Aug 26, 2021
@Aaron-Junker Aaron-Junker added the Status-In progress This issue or work-item is under development label Aug 26, 2021
@jaimecbernardo jaimecbernardo added Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Status-In progress This issue or work-item is under development labels Aug 26, 2021
@dedavis6797
Copy link
Contributor

Resolved with the release of v0.45.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Product-PowerToys Run Improved app launch PT Run (Win+R) Window Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. Severity-High Bugs that we consider a blocking issue for release (crashes stuff outside of PT)
Projects
None yet
Development

No branches or pull requests

7 participants