-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Do not run elevated by default #884
Conversation
It looks great. |
Regarding the ShotcutGuide running non-elevated: when the current active window is elevated, the guide will not show up. Is that caused by not being able to become the top most window or by failing to generate the preview? In the second case can we just not show the preview? |
I think it is because keyboard hook not working when the active window is elevated, but I should double check this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some nits/clarifications
When both |
src/runner/main.cpp
Outdated
is_process_elevated() ? | ||
L"Could not restart PowerToys as a non-elevated process!" : | ||
L"Could not restart PowerToys as an elevated process!", | ||
L"Error", MB_OK | MB_ICONERROR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put these strings in the resource file.
Not sure if it sounds better
Feel free to suggest different wording. |
lets hold here. It is unclear why someone needs to run with the elevated permissions. That is what must clearly be articulated to the end user. Is it to be on top of everything for Shortcut Guide, that requires admin? |
@crutkas |
I think we need to be crisp and clear and document which modules need what. Can we detect if a window is at elevated privilege then elevate us? Or warn the users we detected an app and require to be launched elevated? |
@crutkas I'm not sure we can reliably detect if a window is running elevated without running elevated ourselves. EDIT: the runner doesn't receive the key pressed events and other windows related events when the active window is elevated and the runner is not elevated. |
why does shortcut guide need it? |
I'm ok checking this in now. I added a .15 item to review language and a .16 item to document the items @enricogior described here |
Because if the active window is elevated, the keyboards events can't be received unless PowerToys also runs elevated. |
23d5fde
to
1eff260
Compare
Make the runner not run as elevated by default. Add a setting for "run PowerToys as elevated" and buttons to restart the process with different elevation level.
1eff260
to
88b46ca
Compare
Make the runner not run as elevated by default. Add a setting for "run PowerToys as elevated" and buttons to restart the process with the different elevation levels.
This reverts commit 7af115a.
Summary of the Pull Request
Make the runner not run as elevated by default. Add a setting for "run PowerToys as elevated" and buttons to restart the process with different elevation level.
PR Checklist
Validation Steps Performed
Manual