Electron setLoginItemSettings doesn't work on tray menu app

Viewed 650

I am trying to auto launch my electron app, electron docs provide the instructions.
I tried electron-quick-start app with this code:

app.setLoginItemSettings({
  openAtLogin: true
})

This works fine without any issue.

But my electron app is just a main process running in background (no BrowserWindow). And when I use this setting in it creates startup entry but doesn't start on windows login. enter image description here

1 Answers

After a lot of trial I found out that, electron app with administrative privilege can't auto launch on startup. You need to remove that privilege from package.json and then it should work normally.

Related