marticliment / UniGetUI

UniGetUI: The Graphical Interface for your package managers. Could be terribly described as a package manager manager to manage your package managers
https://www.marticliment.com/unigetui/
MIT License
12.56k stars 437 forks source link

[FEATURE REQUEST] Utilize elevation of UniGetUI for subcommands (aka Support stupid PolicyPak system) #2868

Open cavanaug opened 4 hours ago

cavanaug commented 4 hours ago

Please confirm these before moving forward.

Describe the new feature

I would like to support the policy pack application. Unfortunately this application does not support pseudo or G pseudo and requires special use of items that they build into the explorer. The only way to elevate is via a right click self elevate with PolicyPak. Normal elevation in windows or sudo simply do not work they fail.

FWIW, I have researched the policy pack documentation and I've found no API or command line that allows for scripted automation in any way. I don't know how they sell this solution in such a crippled fashion but I hope eventually Microsoft makes more of Winget and other capabilities available to IT administrators so they stop using this stupid PolicyPak application.

Until then, my general workaround has been to run this self elevate with policy pack for a Powershell window and then run winget update --all. I however would much prefer to use Uniguet UI.

My suggested approach would be to allow the execution of UnigetUI elevated via this workaround. Perhaps add a dev setting in the app that allows for this elevation of the application to transitively pass elevation to all sub commands such as winget chocolatey or scoop. I know this is ugly but it's the only way I can see how to get this work in my environment.

Note, this is not a compromise of the policy pack system, even in my powershell example logs every system command that's run underneath it. In this case it would just be logging all the commands that UnigetUI executes. So the data still exists it just supports a model that is far more convenient for common use cases.

Describe how this new feature could help users

It will allow to support systems governed by PolicyPak system and/or systems where normal windows elevation or sudo do not work but still provide a mechanism to elevate an application such as UniGetUI

marticliment commented 4 hours ago

I don't really understand how PolicyPack works. So running sudo or similar is blocked? What can a process do to run elevated?