Hofknecht / SystemTrayMenu

SystemTrayMenu - Browse and open your files easily
http://hofknecht.eu/systemtraymenu/
GNU General Public License v3.0
642 stars 45 forks source link

[BUG] Child processes won't elevate #488

Closed DailenG closed 1 year ago

DailenG commented 1 year ago

Discussed in https://github.com/Hofknecht/SystemTrayMenu/discussions/487

Originally posted by **DailenG** June 16, 2023 I'm running System Tray Menu on a user with no admin privileges and using shortcuts that launch chocolatey to install an application. I have SystemTrayMenu running with elevated privileges, I have chocolatey set to always run with admin privileges, but if I launch a shortcut from System Tray Menu it launches without elevation or prompting for elevation (either is ok). If I launch the shortcut directly it will prompt for elevation. Am I doing something wrong or is there a workaround? I'm not sure how to get it to prompt aside from using a third party like gsudo to induce elevation.
Hofknecht commented 1 year ago

@DailenG Thank you for the feedback!

i need to test with user without admin rights

Normally UAC should work like here with Admin user: 1 2

Hofknecht commented 1 year ago

@DailenG

ok now with normal user i can reproduce. found this: https://stackoverflow.com/questions/16926232/run-process-as-administrator-from-a-non-admin-application and with the change Verb = "runas", it works

Hofknecht commented 1 year ago

@DailenG will be in the next version (but i assume this takes a while), we added you to the thanks section : )

Hofknecht commented 1 year ago

when admin privliges then process does not start when using verb "runas" checks for Admin not working so still open topic we need to revert current change

Hofknecht commented 1 year ago

@topeterk
The first solution was bad. Now there is a new one [1.3.2.6], hope this works fine.