mikaelbr / node-notifier

A Node.js module for sending notifications on native Mac, Windows and Linux (or Growl as fallback)
MIT License
5.73k stars 322 forks source link

Windows 10 - SnoreToast is added to Start Menu #314

Open MarcusCemes opened 4 years ago

MarcusCemes commented 4 years ago

Good day! 😁

Problem

  1. Installing ts-node-dev, which lists node-notifier as a dependency, on Windows 10 creates a Start Menu shortcut to the SnoreToast.exe binary.

  2. The Start Menu entry is not removed when the node_modules folder is cleaned (removed). I'm particularly worried about any registry (ugh...) changes that might be made on installation.

Reproduction

Adding the ts-node-dev package to any Node.js project on Windows 10 installs node-notifier, and annoyingly, creates a shortcut under C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\SnoreToast that points to C:\Users\...\some_project\node_modules\node-notifier\vendor\snoreToast\SnoreToast.exe.

![image](https://user-images.githubusercontent.com/20288819/74432261-10dd0000-4e5f-11ea-880b-e1c2b27cb581.png)

Context

For the past few days, I've been noticing an application called SnoreToast appearing and disappearing in my Recently Added under the Start Menu. I've finally tracked it down to a deep npm dependency in one of my projects.

I'm guessing that the vendor install script runs an installer that expects a user-wide install? What if there are two separate projects using the package?

Motivation

It's annoying. I don't expect anyone that installs a local npm dependency to end up with additional entries in their Start Menu/Launchpad/Linux-distro equivalent. Many programmers use Windows, please don't let this descend into a "well you should be using Linux, issue closed" debate.

mewtlu commented 4 years ago

I've also seen node-notifier installing terminal-notifier.app as a startup app on MacOS, which makes me very uneasy? Any info on why this might happen?

mikkelgunvald commented 4 years ago

It seems to be a requirement from windows that you have to have a valid shortcut in the start menu to send notifications. https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/hh802762(v=vs.85)?redirectedfrom=MSDN

However it should remove shortcut when package is remove/deleted/cleaned, imo.

peppelongo96 commented 4 years ago

Good day!

Problem

  1. Installing ts-node-dev, which lists node-notifier as a dependency, on Windows 10 creates a Start Menu shortcut to the SnoreToast.exe binary.
  2. The Start Menu entry is not removed when the node_modules folder is cleaned (removed). I'm particularly worried about any registry (ugh...) changes that might be made on installation.

Reproduction

Adding the ts-node-dev package to any Node.js project on Windows 10 installs node-notifier, and annoyingly, creates a shortcut under C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\SnoreToast that points to C:\Users\...\some_project\node_modules\node-notifier\vendor\snoreToast\SnoreToast.exe.

image

Context

For the past few days, I've been noticing an application called SnoreToast appearing and disappearing in my Recently Added under the Start Menu. I've finally tracked it down to a deep npm dependency in one of my projects.

I'm guessing that the vendor install script runs an installer that expects a user-wide install? What if there are two separate projects using the package?

Motivation

It's annoying. I don't expect anyone that installs a local npm dependency to end up with additional entries in their Start Menu/Launchpad/Linux-distro equivalent. Many programmers use Windows, please don't let this descend into a "well you should be using Linux, issue closed" debate.

I made my personal fix for my use case that is as "illegal" as very useful. Since node.js installation adds also its site link on start menu, I used 'https://nodejs.org/' as appID field, and that's it.