I'm using electron-squirrel-startup to create start menu shortcuts but I need to pass in arguments to the shortcut, right now I'm editing the index.js
in node_modules/electron-squirrel-startup
like this:
run(['--createShortcut=' + target + ' --process-start-args=showSplash'], app.quit);
Although it doesn't create the shortcut anymore.
How can I create the start menu shortcut with arguments?
For some reason the child_process spawn
didn't run the command so I swapped it out for exec
like this:
exec(updateExe + ' ' + args[0], function (err, stdout, stderr) {
done();
});
But I needed to put double quotes around the target as well because it has two words:
run(['--createShortcut="' + target + '" --process-start-args=showSplash'], app.quit);