I developed an Electron app and with the use of eletron-packager
and then electron-squirrel-startup
I created .exe
and .msi
installer files. The .exe
file is working fine, but the .msi
is not. It looks like it just stops at some point and turns off. In the Control Panel I can see “my_app Machine-Wide Installer”, I am not sure if that is the desired effect, but nonetheless, my_app is not installed.
I have a pretty basic handleSquirrelEvents function:
switch (squirrelEvent) {
case '--squirrel-install':
case '--squirrel-updated':
// Optionally do things such as:
// - Add your .exe to the PATH
// - Write to the registry for things like file associations and
// explorer context menus
// Install desktop and start menu shortcuts
spawnUpdate(['--createShortcut', exeName]);
setTimeout(application.quit, 1000);
return true;
case '--squirrel-uninstall':
// Undo anything you did in the --squirrel-install and
// --squirrel-updated handlers
// Remove desktop and start menu shortcuts
spawnUpdate(['--removeShortcut', exeName]);
setTimeout(application.quit, 1000);
return true;
case '--squirrel-obsolete':
// This is called on the outgoing version of your app before
// we update to the new version - it's the opposite of
// --squirrel-updated
application.quit();
return true;
}
It's a bit far-fetched but maybe it has something to do with digital signatures?
I found this : https://github.com/Squirrel/Squirrel.Windows/blob/master/docs/using/machine-wide-installs.md
It says:
It looks like my
.msi
is working just fine only I expected different results.