PowerToys Run doesn't open if window running as admin is in foreground

Created on 22 Jun 2020  路  14Comments  路  Source: microsoft/PowerToys

Steps to reproduce


Start PowerToys as admin, and open cmd as admin. Press Alt+Space

Expected behavior


PT Run should appear

Actual behavior


PT Run doesn't appear and window context menu gets opened.

Issue-Bug Product-Launcher Resolution-Fix-Committed

Most helpful comment

This has been fixed! Update your Powertoys if you haven't yet 馃槃

All 14 comments

doesn't KBM have the same issue?

This is elevation issues

@crutkas Yes, but it would work earlier on 0.18.2 because we were using RegisterHotkey and not LL hooks. The other difference is that for KBM you can restart PT as admin and it will work fine, but since the changes in #3451 even if you restart PT as admin, PowerToys Run will run at user privilege, and the hook logic is running in the same process.
The correct workaround would be to move that low level hook logic to runner itself or to another process with same privilege as runner, so that restarting as admin works.

Edit: Edited the repro steps to start PT as admin

we'd have to have a comm channel then to PT Run as the exe for PT Run will always launch non-elevated now

Hi, same issue but very SEVERE with total Windows 10 v2004 crash.

  1. Probably launch a cmd/software with Administrator privileges
  2. Install latest Powertoys
  3. Set to sleep for the night
  4. When going out of sleep, PT sends message concerning Administrator privileges
    AND Powertoys Run is crashed and cannot be killed.
    Even at shutdown, Windows is unable to kill Run app.
    Force shutdown.
  5. Restart PC, Windows will never boot

Tried everything with Windows Recovery (Safe mode KO, autodiag, sfc /offbootdir, ...chkdsk). Nothing works.
PC totally crashed by Powertoys (Run is probably the one)

NB. Bitdefender Free Antivirus blocked Fusion.dll. I don't know if this can help.

@djibe Can you open a separate issue for that? The issue I created does not happen in 0.18.2 and it's for tracking a change made in master.

We have the same bug on KBM if it is not running as admin. (PT 0.19.0)

Yes for KBM there isn't much we can do since that is how low level hooks work. But running as admin brings the process to the same privilege level so that fixes it. In launcher however some logic was changed such that PowerLauncher.exe will always run at user level (since running at admin level was causing certain other issues), which is why even if you run PT as admin, PT Run's hotkey has this issue.

The reference of issue 4608 was a mistake of mine.

Yes for KBM there isn't much we can do since that is how low level hooks work.

@arjunbalgovind
Maybe we can bring KBM in a extra exe file an run it every time as admin. Then it's fixed.

@arjunbalgovind @htcfreek
If the executable which registers the hook uses the uiAccess="true" attribute in its manifest (and meets all of the requirements for that), even without running as admin it would be able to intercept keystrokes destined for elevated apps. See Security Considerations for Assistive Technologies.

@arjunbalgovind @htcfreek
If the executable which registers the hook uses the uiAccess="true" attribute in its manifest (and meets all of the requirements for that), even without running as admin it would be able to intercept keystrokes destined for elevated apps. See Security Considerations for Assistive Technologies.

@enricogior @crutkas This is something we could consider for all the modules with LL hooks. I had mentioned it earlier as a requirement for solving certain key remap scenarios for KBM in #3192 , but this can also be used to avoid running modules with elevation.

Same issue here:
When I try opening PowerToys Run from a Windows Terminal window running as admin, the PowerToys Run doest not open.

Windows: Version 10.0.19041 Build 19041
PowerToys: 0.21.1

This has been fixed! Update your Powertoys if you haven't yet 馃槃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

saahmedm picture saahmedm  路  3Comments

seritools picture seritools  路  3Comments

amorenew picture amorenew  路  3Comments

ivadham picture ivadham  路  3Comments

aminya picture aminya  路  3Comments