coreybutler / coreybutler/node-windows
Frustrating bug when uninstalling a service and then trying to reinstall - resolved with this.
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 368
- PR merge metrics
- No merged PRs in 30d
Description
This irritating bug took me 2 days to figure out! It would be nice if someone could fix this one.
How to reproduce (must be run procedurally in a single function to reproduce):
Create a service object using Service
Then install eg. svc.install(); and double check the Services UI to make sure it shows up there.
Then uninstall the service using svc.uninstall() and double check the Services UI to make sure it isn't there.
Then reinstall using the svc.install()
This will not create the service.
Solution, before doing the second install, delete the daemon folder
Then perform the install and that will work.
I can't explain why per say.
Contributor guide
Research direction
Start by reproducing the Service install, uninstall, and reinstall sequence procedurally in one function, checking the Windows Services UI after each step. Trace how the daemon folder is handled across uninstall and install; done means reinstalling creates the service without manually deleting that folder.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100