Skip to content

Add an Option to always run Flow launcher as Administrator on startup #2639

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
Dev123456689 opened this issue Apr 7, 2024 · 16 comments
Open
Labels
enhancement New feature or request

Comments

@Dev123456689
Copy link

Dev123456689 commented Apr 7, 2024

Is your feature request related to a problem? Please describe.

A plugin called 'WinHotkey' need administrator previlages to run properly which resulted me to ask for this feature.

Describe the solution you'd like

An option in the General settings below 'Start flow Launcher at system startup' as 'Run Flow launcher as administrator on startup' or something like so.

Describe alternatives you've considered

My single cell smooth brain worked very hard but couldn't find an alternative.

Additional context

Please add this feature.

@Dev123456689 Dev123456689 added the enhancement New feature or request label Apr 7, 2024
@JohnTheGr8
Copy link
Member

Try this:

  • open Task Manager
  • go to the Startup tab
  • find flow launcher in the list
  • right click -> Properties -> Compatibility
  • check Run this program as an administrator

@JohnTheGr8 JohnTheGr8 changed the title [Describe Your Feature] Add an Option to always run Flow launcher as Administrator on startup Add an Option to always run Flow launcher as Administrator on startup Apr 22, 2024
@JohnTheGr8 JohnTheGr8 added the Waiting for response Waiting for poster to respond to Team message label Apr 22, 2024
@Dev123456689
Copy link
Author

i have used task scheduler to achieve the same but it would be nice if an option can be added to run flow launcher as administrator.

@Dev123456689
Copy link
Author

Dev123456689 commented May 4, 2024

@JohnTheGr8
I have responded 2 weeks ago, remove the lable 'Waiting for response' from this issue. I have reported the issue a month ago and there is no outcome of it except for waiting

@JohnTheGr8
Copy link
Member

@JohnTheGr8 I have responded 2 weeks ago, remove the lable 'Waiting for response' from this issue. I have reported the issue a month ago and there is no outcome of it except for waiting

🫡 yessir

@JohnTheGr8 JohnTheGr8 removed the Waiting for response Waiting for poster to respond to Team message label May 13, 2024
@Dev123456689
Copy link
Author

And when running flow Launcher as administrator is launches all the other applications/programs also with administrator permission without showing any UAC prompt, this is a very big security issue, please look into the matters. 😊

@jjw24
Copy link
Member

jjw24 commented Jul 3, 2024

Hi there, unfortunately this is the Windows behaviour- launching any app as admin and subsequent processes launched by it will also have the same admin privileges. This afaik not something that can be changed.

@jjw24
Copy link
Member

jjw24 commented Jul 3, 2024

Since there is already the solution for running as administrator on startup, we won't be building this functionality into flow.

I know this unfortunately doesn't appropriately address the actual issue with WinHotkey plugin, but I can't think of anything atm. I will keep this issue open for a bit in case something comes to mind.

This comment has been minimized.

@github-actions github-actions bot added the Stale label Sep 2, 2024
@Dev123456689
Copy link
Author

This issue is not stable just they are not listening to me. Powertoys and many other software with admin privileges can open other software without admin privileges why is a Windows OS restrictions only for flow launcher.

@github-actions github-actions bot removed the Stale label Sep 5, 2024
@jjw24
Copy link
Member

jjw24 commented Sep 5, 2024

Hi there, PowerToys Run is actually not allowed to run as admin, therefore while most of the other PowerToys modules are running as admin, Run and its subsequent executed programs and processes are still running as non-elevated.

It's a convoluted process to develop the means to run as non-elevated process from an elevated one, at this stage I don't think the effort is justifiable.

Copy link

github-actions bot commented Nov 5, 2024

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 60 days.\n\nAlternatively this issue can be kept open by adding one of the following labels:\nkeep-fresh

@github-actions github-actions bot added the Stale label Nov 5, 2024
Copy link

This issue was closed because it has been stale for 7 days with no activity. If you feel this issue still needs attention please feel free to reopen.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 17, 2024
@damsdev1
Copy link

Hi there, PowerToys Run is actually not allowed to run as admin, therefore while most of the other PowerToys modules are running as admin, Run and its subsequent executed programs and processes are still running as non-elevated.

It's a convoluted process to develop the means to run as non-elevated process from an elevated one, at this stage I don't think the effort is justifiable.

You can do it effortlessly with CreateProcessWithTokenW with getting token from explorer.exe.
Here are some ressources about it: https://github.com/jay/RunAsDesktopUser
https://learn.microsoft.com/fr-fr/archive/blogs/aaron_margosis/faq-how-do-i-start-a-program-as-the-desktop-user-from-an-elevated-app
You can also do it without any effort by using Process.Start("explorer.exe", "C:\\Path\\To\\YourProgram.exe"); because explorer.exe always run as normal user.

I'll do a PR if you're too busy to do it, but it might be worth implementing if you also implement the Win keyboard shortcut (from the dev build) because pressing Win on a program with administrator rights won't prevent the real start menu from opening if FlowLauncher isn't also administrator.

@Jack251970 Jack251970 reopened this Feb 12, 2025
@Jack251970
Copy link
Contributor

Jack251970 commented Feb 13, 2025

@damsdev1 We’re currently working on Win keyboard shortcuts this pull request (PR): Flow-Launcher/Flow.Launcher#3157. We’d greatly appreciate your feedback or contributions if you’re able to assist. Thank you!

@github-actions github-actions bot removed the Stale label Feb 13, 2025
@jjw24
Copy link
Member

jjw24 commented Feb 13, 2025

@Jack251970 wrong PR link?

@Jack251970
Copy link
Contributor

@jjw24 He referenced the implementation of the Win keyboard shortcut, so I attached the PR for Win keyboard shortcut here.

Additionally, he mentioned that administrator rights might be worth considering for the implementation of the Win keyboard shortcut. I’m curious if this could be helpful, especially since you’re the author of this PR.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants