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

WinNUT as a Windows Service #46

Open
vnoder opened this issue Oct 23, 2022 · 4 comments
Open

WinNUT as a Windows Service #46

vnoder opened this issue Oct 23, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@vnoder
Copy link

vnoder commented Oct 23, 2022

No description provided.

@gbakeman
Copy link
Contributor

We currently don't have the capabilities for running WinNUT as a service. I know it's been on the planning board for quite some time, but I believe it would take quite a bit of work to implement as a feature. I'll leave this issue open, but I'm not sure this is in the future for current WinNUT. I definitely think service operation will be a part of the next generation of WinNUT though.

@gbakeman gbakeman added the enhancement New feature or request label Oct 23, 2022
@gbakeman gbakeman changed the title how to run winnut as a windows service WinNUT as a Windows Service Oct 23, 2022
@timedge5
Copy link

Hello! I have been trying to implement WinNUT as a service using NSSM - a nice program that has worked great in the past for converting apps to services. However, while it seems that while NSSM runs the program fine, none of the settings that I applied are used. When I run the app normally, I can setup something like shutdown on 90% for testing, then minimize it to tray and see it shutdown when UPS hits that. However, if I the exit the app and start the service I can see the app running in the background processes but when the UPS drops below 90% again it doesn't shut down the server. I have tried to find an ini or config file but can't find anything referencing the settings. Where would I find a file that shows the settings being applied in the client? Thanks!

@gbakeman
Copy link
Contributor

Hi @timedge5 ,

WinNUT stores its settings in the current user's registry hive, so I wonder if NSSM is trying to run WinNUT as a different user and therefor not loading the settings you're creating. I'm not aware of any facilities we currently have to (safely) move settings into the system hive (where NSSM is probably looking for them), but you could try copying the HKEY_CURRENT_USER\SOFTWARE\WinNUT hive to its respective location in the system registry, and then try running it as a service. Note that any saved password will likely become invalid when accessed by a different user.

See also

@timedge5
Copy link

@gbakeman Nice that was it. As soon as I point the service to the user that the settings were created on, it runs perfectly. Thank you! This could obviously now be done with setting up a service account and making sure the reg entries are there. Onwards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants