Please read the posts in the Announcements section about the current status of Cumulus development now that I have retired

Please read this post before posting

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See this post 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.
soend
Posts: 4
Joined: Thu Oct 06, 2016 10:43 am
Weather Station: davis vp2
Operating System: win 10

Run CumulusMX as windows service

Postby soend » Mon Oct 31, 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: 5099
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Run CumulusMX as windows service

Postby mcrossley » Mon Oct 31, 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: 5099
Joined: Thu Jan 07, 2010 9:44 pm
Weather Station: Davis VP2
Operating System: Stretch Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Run CumulusMX as windows service

Postby mcrossley » Mon Oct 31, 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 Oct 06, 2016 10:43 am
Weather Station: davis vp2
Operating System: win 10

Re: Run CumulusMX as windows service

Postby soend » Mon Oct 31, 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: 141
Joined: Thu Apr 11, 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

Postby rogerthn » Mon Oct 31, 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 Oct 06, 2016 10:43 am
Weather Station: davis vp2
Operating System: win 10

Re: Run CumulusMX as windows service

Postby soend » Mon Oct 31, 2016 6:11 pm

I followed this https://blog.blksthl.com/2014/03/10/the-easy-guide-to-creating-a-scheduled-task-running-as-system/ guide to get the task to run under SYSTEM account but it didnt help.

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

Re: Run CumulusMX as windows service

Postby soend » Mon Oct 31, 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 Dec 26, 2009 8:15 pm
Weather Station: Watson W-8681
Operating System: Windows Server 2003

Re: Run CumulusMX as windows service

Postby justinhow » Tue Nov 01, 2016 8:50 am

Brilliant - works for me!

Thanks

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

Re: Run CumulusMX as windows service

Postby agsteele » Fri Jun 16, 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 Apr 15, 2014 2:24 am
Weather Station: Lacrosse WS2300
Operating System: Windows XP SP3
Location: Oamaru, New Zealand

Re: Run CumulusMX as windows service

Postby FrancisT » Mon Dec 25, 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.


Return to “Cumulus MX”

Who is online

Users browsing this forum: No registered users and 6 guests