Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

Don't run application on install

Open alex8b opened this issue 7 years ago • 2 comments

I have Squirrel installer that installs and creates shortcuts for 3 different executables. By default it launches all of them on first install. I want to be able to choose which ones to run.

I tried to use SquirrelAwareApp but one of my apps requires admin rights in manifest so it will first show UAC dialog and only then proceed to onFirstRun where I force exit the app. That's ugly.

I thought --silent option might be a temporary solution. But there's no way to make it default. Setting SquirrelSettings.Silent = true when building installer doesn't do the trick. The installer still runs in normal mode and launches all of the apps.

alex8b avatar Jan 16 '18 10:01 alex8b

@alex8b The UAC dialog should show, no matter the way you execute your app that requires it, isn't it? Squirrel SquirrelAwareApp is the way to go to filter which exe gets executed.

Thieum avatar May 06 '19 20:05 Thieum

@anaisbetts Hello, I am using electron-builder-squirrel-windows version 24, and I set the following settings in electron-builder settings to run electron with administrator privileges to create a folder.

...
"build": {
    "win" : {
        "target" : ["squirrel"],
        "requestedExecutionLevel": "requireAdministrator",
    }
}
.,..

When set up like this, squirrel will also be run as an administrator. Is it okay to run it like this?

The reason I ask is because I saw in your post that squirrel is not designed to be run as an administrator. Right now, when I build and run Electron with these settings, UAC pops up, but it doesn't seem to be a big problem, so I'm asking.

https://github.com/Squirrel/Squirrel.Windows/issues/1264#issuecomment-370655022

oinochoe avatar Nov 08 '23 09:11 oinochoe