Msi installer created by `electron-squirrel-startup` not working


#1

Hi,

I created an electron app and with use of eletron-packager and then electron-squirrel-startup I created .exe and .msi installers.
The .exe installer work fine but .msi doesn’t. It looks like it’s just stops at some point and turns off. In the Control Panel I can see “my_app Machine-Wide Installer”, but 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;
    }

Any suggestions on where the problem lies?