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

PowerToys.Run does not launch apps through the user account that has started PowerToys #17227

Open
1 task done
ZenoArrow opened this issue Mar 23, 2022 · 6 comments
Open
1 task done
Labels
Area-Runner The PowerToys main executable Idea-Enhancement New feature or request on an existing product Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Product-PowerToys Run Improved app launch PT Run (Win+R) Window

Comments

@ZenoArrow
Copy link

Microsoft PowerToys version

0.56.2

Running as admin

  • Yes

Area(s) with issue?

PowerToys Run

Steps to reproduce

Ensure PowerToys is not running. Find PowerToys.exe, shift+rightclick, run as different user. After PowerToys started, Alt+Space to launch PowerToys.Run, start cmd. In cmd, enter whoami. The user shown is not the "different user" that was used to start PowerToys.

✔️ Expected Behavior

PowerToys.Run should use the same user that was used to start PowerToys. To show expected behaviour, run cmd (without using PowerToys.Run) as a different user, and in cmd run whoami, the name of the different user should then be shown.

❌ Actual Behavior

PowerToys.Run ignores the user that was used to start PowerToys.

Other Software

cmd (from Microsoft Windows [Version 10.0.19044.1586])

@ZenoArrow ZenoArrow added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 23, 2022
@jaimecbernardo
Copy link
Collaborator

It does. I think this is the case of using the shell as a way to start PowerToys Run as not administrator. We use the shell for it and this looks like a side effect from it. Many users scenarios are not well supported by PowerToys.

@jaimecbernardo jaimecbernardo added Product-PowerToys Run Improved app launch PT Run (Win+R) Window Area-Runner The PowerToys main executable and removed Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Mar 24, 2022
@jaimecbernardo jaimecbernardo added this to the Post stabilization milestone Mar 24, 2022
@ZenoArrow
Copy link
Author

To add some details the "different user" that I'm running as has admin rights. Hopefully this can be a feature that can be added. Ideally I would like to run as both a different user and as an admin (in this scenario, I would hope to be prompted for a username and password at startup, but not be prompted afterwards).

@htcfreek
Copy link
Collaborator

htcfreek commented Mar 26, 2022

@jaimecbernardo
Should we mark this as duplicate of #1605. This allows to run apps and commands as different user.

@jaimecbernardo
Copy link
Collaborator

I think @ZenoArrow wants something different here. I think he wants to be prompted once when PowerToys Run starts, but I imagine #1605 is likely what's going to happen.

@htcfreek
Copy link
Collaborator

As I imagine in the past we keept the permission/context that runner has. But because then everything is open with admin permission if runner has it, we changed behavior to start pt run always in non elevated context.

@ZenoArrow
Copy link
Author

As I imagine in the past we keept the permission/context that runner has. But because then everything is open with admin permission if runner has it, we changed behavior to start pt run always in non elevated context.

What I'm asking for is the option to override this default behaviour. I'd like to be able to start PowerToys, enter my alternate user credentials once, using a user that has admin rights, and not be prompted for UAC again any time I use PowerToys.Run until I close and reopen PowerToys.

I realise that what I've described will never be the default behaviour, as it'll not be seen as following "best practices" for managing user rights, but I would like for PowerToys to give me the option to do this. Believe it or not, the request is being made as it would on-balance permit greater user restrictions elsewhere in IT systems I work with, thereby improving security overall without negatively impacting on user workflows (I wouldn't want to go into the exact specifics for security reasons, I just wanted to highlight that this request will enable better workflows in some cases).

@jaimecbernardo jaimecbernardo added Idea-Enhancement New feature or request on an existing product Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams and removed Issue-Bug Something isn't working labels Mar 29, 2022
@jaimecbernardo jaimecbernardo removed this from the Post stabilization milestone Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Runner The PowerToys main executable Idea-Enhancement New feature or request on an existing product Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Product-PowerToys Run Improved app launch PT Run (Win+R) Window
Projects
None yet
Development

No branches or pull requests

3 participants