stsrki / KeepAliveHD

Prevent hard-drives from going into sleep mode.
MIT License
272 stars 17 forks source link

Feature request: install as a servce #20

Open c-dump opened 4 years ago

c-dump commented 4 years ago

It would be nice if the application could have an option to install itself as a system service, so that the user can remove the icon from systray, having the process always running in background.

stsrki commented 4 years ago

Hi @c-dump Sorry for not answering soon.

I don't plan to add support for running as windows service as that would take more time then I currently have. Maybe I could consider it in the future.

GitHubbie0836 commented 2 years ago

@c-dump use NSSM for run as a system service.

ahaverty commented 1 year ago

Installing as a service with nssm doesn't seem to work. It looks like the auto-start option in KeepAliveHD settings only works if it's been started by task scheduler (not a service). I'm also looking for a hdd keep alive that I can run as a service (as my machine often reboots and starts services intentionally, but doesn't actually login to a user account).

GitHubbie0836 commented 1 year ago

Installing as a service with nssm doesn't seem to work.

Works fine for me (Winsvr 2022).

ahaverty commented 1 year ago

Works fine for me (Winsvr 2022).

nssm runs KeepAliveHD as a service for you, without requiring manual login first? e.g you reboot, and don't manually login, but KeepAliveHD still runs correctly?

GitHubbie0836 commented 1 year ago

nssm runs KeepAliveHD as a service for you, without requiring manual login first? e.g you reboot, and don't manually login, but KeepAliveHD still runs correctly?

Yes. When installing the service, in the "Log on" tab, select "Virtual service account". Stop the service after installation. Run the program then in the usual way. Make all settings. Close it and transfer all settings to the appropriate folder located in "C:\Windows\ServiceProfiles". Then start the service.