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

Make Squirrel not launch program after install

Open upn0rth opened this issue 7 years ago • 6 comments

I was wondering if there are any way not having the program launch after the install. The reason being that some files probably arent loaded into the first run of the program when using the Squirrel installer. This causes my program to crash. All other launches of the program are working just fine, but not the first run.

Thanks

upn0rth avatar Mar 25 '17 23:03 upn0rth

You should re-read the documentation around Custom Squirrel Events.

Andrew-Hanlon avatar Mar 27 '17 14:03 Andrew-Hanlon

Yep, that's what I have been looking at. Is there any wiki list of the functionality of the custom events? Or are these the only docs? https://github.com/Squirrel/Squirrel.Windows/tree/master/docs/using

Could you use onInitialInstal to close the program after the install so that it doesn't start?

SquirrelAwareApp.HandleEvents( onInitialInstall: v => mgr.CreateShortcutForThisExe());

upn0rth avatar Mar 27 '17 16:03 upn0rth

You could use onFirstRun to set a boolean much like it's done in that example and later test that boolean to exit the program.

Slion avatar May 20 '17 13:05 Slion

@upn0rth did you try the solution provided by @Slion ? If it fixed your issue, you can close this.

Thieum avatar May 03 '19 12:05 Thieum

If anyone is looking for the solution : use the --silent switch on the setup. E.g : setup.exe --silent

keytrap-x86 avatar Aug 20 '20 05:08 keytrap-x86

@keytrap-x86 How do we make the user add --silent when they download and click the installer?

cope avatar Jan 16 '24 09:01 cope