Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3044 7 December 2018. See the Wiki for download

Run CumulusMX as windows service

Discussion of version 3 of Cumulus, which runs on Windows, Linux, and OS X. All Cumulus MX queries in here, please.

Moderator: mcrossley

Post Reply
soend
Posts: 4
Joined: Thu 06 Oct 2016 10:43 am
Weather Station: davis vp2
Operating System: win 10

Run CumulusMX as windows service

Post by soend » Mon 31 Oct 2016 8:43 am

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.

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Run CumulusMX as windows service

Post by mcrossley » Mon 31 Oct 2016 10:54 am

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.

User avatar
mcrossley
Posts: 5234
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Run CumulusMX as windows service

Post by mcrossley » Mon 31 Oct 2016 10:59 am

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 ;)

soend
Posts: 4
Joined: Thu 06 Oct 2016 10:43 am
Weather Station: davis vp2
Operating System: win 10

Re: Run CumulusMX as windows service

Post by soend » Mon 31 Oct 2016 12:38 pm

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.

User avatar
rogerthn
Posts: 159
Joined: Thu 11 Apr 2013 6:31 pm
Weather Station: Oregon Scientific WMR88
Operating System: Raspbian GNU/Linux 8
Location: Trollhättan Sweden
Contact:

Re: Run CumulusMX as windows service

Post by rogerthn » Mon 31 Oct 2016 5:49 pm

20161031.PNG
Have you tried SYSTEM and/or Run with highest privileges?
You do not have the required permissions to view the files attached to this post.
Image

soend
Posts: 4
Joined: Thu 06 Oct 2016 10:43 am
Weather Station: davis vp2
Operating System: win 10

Re: Run CumulusMX as windows service

Post by soend » Mon 31 Oct 2016 6:11 pm

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.

soend
Posts: 4
Joined: Thu 06 Oct 2016 10:43 am
Weather Station: davis vp2
Operating System: win 10

Re: Run CumulusMX as windows service

Post by soend » Mon 31 Oct 2016 6:55 pm

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).
You do not have the required permissions to view the files attached to this post.

User avatar
justinhow
Posts: 4
Joined: Sat 26 Dec 2009 8:15 pm
Weather Station: Watson W-8681
Operating System: Windows Server 2003

Re: Run CumulusMX as windows service

Post by justinhow » Tue 01 Nov 2016 8:50 am

Brilliant - works for me!

Thanks

agsteele
Posts: 39
Joined: Tue 21 Jun 2011 7:50 am
Weather Station: Davis Vantage Vue
Operating System: Windows 10
Location: Keighley, UK

Re: Run CumulusMX as windows service

Post by agsteele » Fri 16 Jun 2017 7:37 am

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

FrancisT
Posts: 1
Joined: Tue 15 Apr 2014 2:24 am
Weather Station: Lacrosse WS2300
Operating System: Windows XP SP3
Location: Oamaru, New Zealand

Re: Run CumulusMX as windows service

Post by FrancisT » Mon 25 Dec 2017 9:50 pm

[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.

keversroperson
Posts: 1
Joined: Mon 23 Apr 2018 8:56 am
Weather Station: Aercus 1093
Operating System: Windows 10

Re: Run CumulusMX as windows service

Post by keversroperson » Sun 29 Apr 2018 9:36 am

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!

Post Reply