Squirrel / Squirrel.Windows

An installation and update framework for Windows desktop apps
MIT License
7.38k stars 1.03k forks source link

Make Squirrel not launch program after install #983

Open upn0rth opened 7 years ago

upn0rth commented 7 years ago

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

Andrew-Hanlon commented 7 years ago

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

upn0rth commented 7 years ago

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());

Slion commented 7 years ago

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.

Thieum commented 5 years ago

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

keytrap-x86 commented 4 years ago

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

cope commented 9 months ago

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