Closed lars-29palms closed 1 year ago
Squirrel does not technically support any apps which require elevation. This is true of the original and this fork. In your case, you've probably specified that your app requires elevation in your manifest. If Squirrel were to launch your app, the user would get the UAC dialog at least twice during installation, and that's not ideal / part of Squirrel's intended use.
I suspect the reason this is throwing instead of raising the UAC dialog is because of the move to .net 6.0, which turned off Process.Start ShellExecute by default, therefore it can not be elevated. I don't intend to fix this or support elevated apps at the moment.
My suggestion would be for your main program (the one that is Squirrel aware) to be a standard non-elevated binary. It can launch the exe which requires elevation after the Squirrel hooks are complete (eg. SquirrelAwareApp.HandleEvents
)
Thanks for your feedback @caesay ! I understand the reasoning behind this, which is one of the main ideas behind Squirrel - next to no user interaction. I will implement the launcher app eventually, which then launches the main app elevated. Requires some rework but certainly possible.
First of all thank you for keeping this project alive!
We have just migrated our app to .NET 6 and moved from Squirrel.Windows to this package, everything working flawlessly so far except for the Update.exe failing to launch the app after installation. Due to the nature of the app, it requires elevated permissions. Squirrel.Windows didn't have a problem with this, but much has changed with Clowd.Squirrel I suppose!
For now we could go back to Squirrel.Windows and live with depending on .NET Framework but it would be great to switch to this fully native, well maintained project.
Here is the error log: