Search code examples
electronautostart

How to change the autostart name, publisher and icon when using app.setLoginItemSettings({ openAtLogin: true })


I am able to toggle autostart functionality in my electron (6.1.2) app by setting app.setLoginItemSettings({ openAtLogin: true }). Under Windows, when I open up the Task Manager and view the list in the Start-up tab, however, the app is shown simply as "Electron" with the publisher "GitHub, Inc." and the default electron icon.

enter image description here

I tried setting win.setAppDetails({relaunchDisplayName: "My App Name"}) in the hopes that this would also affect the Start-up name, but that didn't change it. I would also like to change the publisher and icon. I have correctly set the name and displayName properties in my app's package.json, and the icon and app name are correctly shown in windows titles and the taskbar.

I tried to implement the auto-launch package instead, which I have used in an nwjs app before, but I couldn't get it to work because it seems that it's incompatible with the node version used by electron. I find it hard to believe that electron simply doesn't offer to change this via any other options provided by that API.


Solution

  • It turns out there's no way to set this manually during development (at least I didn't find one, but I'm open to suggestions and further answers). However, once the app is built, the correct information will be taken from the binary and/or the package.json.