I've set my electron app to auto-start on windows:
app.setLoginItemSettings({
openAtLogin: true,
path: process.execPaths
})
This adds an entry to registry at location Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run\electron.app my app
I'm using electron-builder to package my app.
It's mention there that I can add a script installer.nsh
at the time of nsis uninstallation.
Here's my custom installer.nsh:
!macro customUnInstall
SetRegView 64
DeleteRegKey /ifempty SHCTX "Software\Microsoft\Windows\CurrentVersion\Run\electron.app.my app"
SetRegView 32
DeleteRegKey /ifempty SHCTX "Software\Microsoft\Windows\CurrentVersion\Run\electron.app.my app"
!macroend
And lastly, I mentioned it in package.json:
"nsis": {
"runAfterFinish": true,
"createDesktopShortcut": true,
"deleteAppDataOnUninstall": true,
"include": "build/installer.nsh"
}
But, still when I uninstall my app the entry is left in the registry.
How to remove this entry?