Page 1 of 1

Run CumulusMX as windows service

Posted: Mon 31 Oct 2016 8:43 am
by soend
Since windows 10 has made it really hard to autostart(impossible) applications on startup with admin privilegs i think it would be good idea to be able to install CumuluMX as windows service.
This would solve the autostart problem...

Myself im a .NET developer and have used Topshelf http://topshelf-project.com/ for making console/service applications.

Re: Run CumulusMX as windows service

Posted: Mon 31 Oct 2016 10:54 am
by mcrossley
Don't forget CMX has to run on Linux and MacOS/OSX as well, so your solution has to be cross-platform if it were to be built-in to CMX.

Re: Run CumulusMX as windows service

Posted: Mon 31 Oct 2016 10:59 am
by mcrossley
Can you not create a Task under Task Scheduler than runs "Run whether user is logged on or not", Select Admin account of your choice, "At startup" - delayed for [5] mins ?

I run a script at start-up using similar settings that resets a registry key our group policy insists is incorrect ;)

Re: Run CumulusMX as windows service

Posted: Mon 31 Oct 2016 12:38 pm
by soend
Using Task Scheduler does not work. That was one of the first things i tried. It just throws the same error when you run it without admin privilegs.

Re: Run CumulusMX as windows service

Posted: Mon 31 Oct 2016 5:49 pm
by rogerthn
20161031.PNG
Have you tried SYSTEM and/or Run with highest privileges?

Re: Run CumulusMX as windows service

Posted: Mon 31 Oct 2016 6:11 pm
by soend
I followed this https://blog.blksthl.com/2014/03/10/the ... as-system/ guide to get the task to run under SYSTEM account but it didnt help.

Re: Run CumulusMX as windows service

Posted: Mon 31 Oct 2016 6:55 pm
by soend
What i ended up doing is using application called NSSM - the Non-Sucking Service Manager https://nssm.cc
Here's what i did step by step:

1) Run command promt as administrator
2) Navigate to folder with nssm.exe - for me it was F:\Downloads\nssm-2.24\win64 - depends where you unpacked nssm.
3) Run command nssm install
runNSSM.PNG
4) NSSM gui tool will open, lets configure the service. Here's the screenshots of the tabs where i changed something:
application.PNG
details.PNG
io.PNG
I/O redirection is the place where the text you usually see in console window will be written when cumulus is running as service and there is no console window.
5) Click "Install service" button after what NSSM will tell you that service was installed successfully.
6) Now we can go and check out our CumulusMX service under windows services. If everything looks good just restart computer to verify that cumulus is started on startup.

To uninstall the service just run "nssm remove CumulusMX" (command prompt run as admin).

Re: Run CumulusMX as windows service

Posted: Tue 01 Nov 2016 8:50 am
by justinhow
Brilliant - works for me!

Thanks

Re: Run CumulusMX as windows service

Posted: Fri 16 Jun 2017 7:37 am
by agsteele
I just upgraded to MX and moved Cumulus to a new PC with Windows 10.

I got this working by setting Windows 10 to startup without requiring a user login/password - I set the PC to login with a local user account (rather than a Microsoft account), run netplwiz and change the tick box to allow startup without user login. (I'm running on a PC which only functions to download the weather station data and connect the results to the outside world).

Then I created a basic task in the task scheduler to run c:/Cumulus/CumulusMX.exe after login with highest privileges. I set the scheduled task to retry 3 times a minute apart.

Andrew

Re: Run CumulusMX as windows service

Posted: Mon 25 Dec 2017 9:50 pm
by FrancisT
[quote="soend"]What i ended up doing is using application called NSSM - the Non-Sucking Service Manager https://nssm.cc

This worked for me too! Excellent work Soend - thanks.

Re: Run CumulusMX as windows service

Posted: Sun 29 Apr 2018 9:36 am
by keversroperson
Thanks Soend! I got Cumulus 1 to work fine with Task Scheduler (running without me being logged in) but wouldn't with MX. This is the perfect solution, it runs without login or the CMD prompt on my desktop.

Top work! Thanks!