Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry left in Task manager startup apps even after uninstalling electron app #2237

Open
GorvGoyl opened this issue Oct 29, 2017 · 10 comments
Open

Comments

@GorvGoyl
Copy link

GorvGoyl commented Oct 29, 2017

  • Version: 19.42.2
  • Target: Windows 10

I've set my electron app to auto-start at bootup.
Here's the setting for that:

app.setLoginItemSettings({
    openAtLogin: true,
    path: process.execPaths
  })

package.json settings:

 "nsis": {
      "runAfterFinish": true,
      "createDesktopShortcut": true,
      "deleteAppDataOnUninstall": true
    }

The issue is when i uninstall the app i can still see the entry in task manager -> startup apps tab.
see the image below (note that 'open file location' is disabled for this entry):
image
On digging I found that electron adds the registry entry @ Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run which doesn't get cleared on app uninstall.

I'm not sure how to get it removed maybe some additional parameters to include in the uninstaller script or any other way?
And also what would be the process in MAC?

@stale
Copy link

stale bot commented Jul 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the backlog label Jul 2, 2019
@stale stale bot closed this as completed Jul 9, 2019
@VictorLeach96
Copy link
Contributor

This issue still persists

@BTARPAR
Copy link

BTARPAR commented Nov 20, 2019

This issue still persists

3 similar comments
@neekai
Copy link

neekai commented Jan 9, 2020

This issue still persists

@eltonchan
Copy link

This issue still persists

@beyondkmp
Copy link
Collaborator

This issue still persists

@jaime-rivas
Copy link

Same here.

@mmaietta
Copy link
Collaborator

Not much electron-builder can do if electron is adding that itself. Makes sense that it can't cleanup during uninstall though, as the app wouldn't be aware of it.
Try using a customUnInstall hook in your https://www.electron.build/configuration/nsis#custom-nsis-script to remove the entry

Mac doesn't have a hook for uninstalls since it's just a file (.app) being deleted from the filesystem

@MeroVinggen
Copy link

This is still an issue.

@mmaietta
Copy link
Collaborator

mmaietta commented Sep 1, 2023

That's nice, thanks for chiming in.

Try using a customUnInstall hook in your https://www.electron.build/configuration/nsis#custom-nsis-script to remove the entry

I'm not familiar with how electron itself inserts a startup app (i.e. LoginItem) nor with Windows registry, but if you can identify a generic way to remove the login item from the registry, then I'm happy to guide you on submitting a PR for resolving an electron-created issue

@mmaietta mmaietta removed the bug label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants