These days I'm going with Electron to create a small native Windows application, and I use the Grunt Electron Installer to create an installer for my application.
The installer was created successfully, but I donβt know how ho handles Squirrel events inside my application, as indicated in the documents that I added to the entry point of my application:
var handleStartupEvent = function() {
if (process.platform !== 'win32') {
return false;
}
var squirrelCommand = process.argv[1];
switch (squirrelCommand) {
case '--squirrel-install':
case '--squirrel-updated':
app.quit();
return true;
case '--squirrel-uninstall':
app.quit();
return true;
case '--squirrel-obsolete':
app.quit();
return true;
}
};
if (handleStartupEvent()) {
return;
}
But I do not know what to do inside this switch statement, for example, to create shortcuts for my application. Actually, I donβt even know if this switch works at all, because when I install (or uninstall) my application, it starts and never shuts down.
Any help is appreciated!