Closed ryan-veracitek closed 2 years ago
The only entries in the registry for this service are the event viewer custom source entries, no actual services. I suppose something could be removing it or blocking it somehow but I can't find any errors or hints as to what. I'll need to test other solutions, I am grateful for this tool and imagine this scenario may be an outlier. Using Node 18.7.0. I did try all of the linking advice mentioned as well as taking spaces out of the service name, but there's no sign that this is working in my case. If there's somewhere besides windows event viewer I can look I'm happy to help debug if it seems worth investigating to you.
Update: tried on a different (win 11) system and it worked as expected with multiple prompts to update system, so the system I'm having issues with in an administrator command prompt is 1, not prompting to change the system at all, 2, not allowing the service to be installed.
Do you have antivirus running?
This happened to me when creating the latest release, but it was on Windows 11. The culprit was Windows Security Protected Directories... which is a feature of many antivirus services. Disabling the service, followed by a reinstallation, worked.
If this is in an corporate environment, sometimes group policies applied via Active Directory can deny permission to create services, even for admin accounts.
Yep, it's in a corporate environment, that is probably what is happening. I'll update here when I find the culprit, it seems like the script itself thinks it succeeded and also continues to think the service exists even though I see no sign of it even in the registry. So I'm confused why it thinks it's installed at all.
Ah! I see, it's the existence of the daemon folder that makes it think it already exists. Still haven't gotten it to work on the prod box yet, is there a way to redirect console output to a log file with this?
answering my own questions, ok, I see the log files in the daemon folder include the stdio, that'll work, thx. now to find what's blocking install on prod.
@coreybutler on the affected machine the daemon folder is not being created in the right place. it's being created at the root of the C drive. On the windows 11 machine that worked properly it was created with the script as expected. Any ideas there?
Ok, last but not least. At some point I removed the backslashes in the file path which did not result in any error including svc.on('invalidinstallation ... that seems to be what caused the daemon folder and exe files to be moved to the root of C and ultimately the install to fail. hope my comedy of errors will help someone else. thank you @coreybutler. It's working as expected now including console output in the daemon folder.
@ryan-veracitek I'm glad you got things squared away. I guarantee you're not the only person who runs into these kinds of issues. This log provides a good checklist for the next person who runs into issues. Thank you for posting your results!
Issue: No service appears in services.msc.
How To Reproduce: Windows 10, follow instructions to install service, get json output that service is installed, look in snap-in no service. Try to install again and find in event viewer event 1000 "The process cannot be installed again because it already exists."
Expected Behavior: The service to appear in the services.msc snap-in and to actually run.