Running as a Service

I note from previous posts that some of you are running WD as a service. How have you managed to achieve this? Just ticking the ‘start as a service under windows NT/2000’ doesn’t make it run as a service on my Windows 2000 server box. It still needs a user to be logged in, and looking under services WD doesn’t appear.

I’ve tried the mod for the registry described on a previous post but that makes no difference and I’ve also tried using the Windows resource kit (the srvany.exe) to convert an application to a service without success. I think it may be because WD has a splash screen at startup which services shouldn’t have.

Any suggestions?

Hi Softvark. Did you ever get this problem sorted? I too would like to run it as a service, but this option doesn’t seem to work.

I’m running version 10.13.

well, its a component i have used…and soi dont actualy have much control over how it operates, i .e i just hoped it would work as advertised
but i am sure some people have it working…maybe they can post here…
on the vws forum there was some posting about a program that allows programs to be run as a service

Here is the Post:
I’ve got vws working as a service now, under Windows XP, though there is one issue outstanding. Here’s the debrief.

The reason I wanted to do this is that I need vws to start up automatically on a reboot, specifically after a power hit when I might not be around. However, I don’t want the machine to start up a user automatically, because the computer is in an insecure location. Unfortunately, Windows is pretty brain-dead in this regard. It doesn’t understand that you might want an arbitrary program running without being logged in, so it treats it as a special case. In windows-speak, such a program is called a “service”. A service needs to be built differently, multithreaded and bound somehow to the Service Control Manager and has some restrictions. (BTW, Unix / Linux treats this much more intelligently, not treating such a program differently.) Since vws is not structured this way I needed to play some games to make it happen.

Enter firedaemon. This is a program that acts as a sort of a wrapper to allow any app to be run as a service, with some limitations. There is a free version, but it seemed to have some problems, and it’s only able to run one service which didn’t work for me since I also wanted to run vwsaprs. So I bought the Pro version for $25. There are a couple of other similar products. See references at the end.

To make it work, run the firedaemon service manager and create vws as a “service definition”. Here are the important setup parameters, organized by dialogue box:

Program:
Short Name: vws
Display Name: vws
Description: Virtual Weather Station
Console Applicaion: NOT checked
Working directory: c:Program Files ws
Executable: c:Program Files ws ws.exe

Settings:
Show Window: Normal
Logon Account: .me (see notes following)
Interact with Desktop: CHECKED
Startup mode: Automatic

Advanced:
Pre-Launch Delay: 5000 ms (see notes)

Dependencies:
(see notes)

Note 1, logon account - By checking “interact with desktop”, vws will appear on your desktop when you do get around to logging in and will be almost normal. By setting the account name, it will only appear for that specific user. If you leave this blank, it will run as LocalSystem, and will appear on everyone’s desktops if there are multiple users. I’m having the best luck by using myself as the user.

Note 2, pre-launch delay and dependencies - I’ve got a weirdness in my system in that my weather station is really connected over ethernet and not a serial line. I’ve got a Lantronix ethernet-serial device server at the station and there’s a special driver on the PC that makes it look like a normal COM port. That driver also takes the form of a service, and of course it needs to run before vws, so I’ve set up firedaemon’s dependencies accordingly and added the 5 second delay because it seems to need it.

So, it works, with one anomaly. I can no longer minimize to the tray. The tray icon that one normally double-clicks in order to minimize to the tray simply isn’t there. I think this because vws tries to bind to the tray when it starts up. In this mode, there is no tray to which to bind, and it probably never tries again. It could be easily fixed by trying repeatedly (I think it’s Shell_NotifyIcon())until it works, somewhere in the execution loop or something. Of course, I can’t do that.

I’d love to see this work better, or without the complication of firedaemon. Here are some suggestions for Ed, easiest first:

  1. Make the tray icon work, by trying until it binds properly.

  2. Make the program work as a service. Probably, this would mean rstructuring as two separate processes - one to talk to the weather station, fill the database, post to wunderground, etc. and the other would be only a UI (maybe even just a browser?). BTW, at least one competitor, Weather Display, does have a simple check item to make it run as a service. This option would have lots of “architectural” benefit, as well.

  3. Make it run under linux. This service thing is only complicated because Microsoft makes it so. In Unix there’s no such thing as a “service” and any program can run at any time. And, yes, I’d happily pay for a linux version.

References:

AppToService - Run applications as Windows services | Basta, http://www.emill.net/servicemill.htm, http://www.activeplus.com/us/products/smill/ (firedaemon competitors)

vbwire.com, vbwire.com (A couple of articles about running an app as a service. They’re specifically about visual basic apps, but the information is concise and useful if you’re interested.)

http://www.cybervox.org/bbs/vantageproboard/2003/1/messages/175.html (an old post about how I networked my weatherstation with the lantronix, in case you’re interested in this wrinkle.)

I haven’t played with running it as a service recently but that solution looks promising. I’m hoping to move WD to another PC this weekend so I might give it a try then.

Julian

Thanks Brian. I’m trying FireDaemon right now and will let you know if it works.

I have found firedaemon to be a bit firnickity at times. For commercial use I use an application called Invoker. Do a Google for either Invoker.exe or Invoker.zip. Its a very easy to use command line utility that does not require any installation (it consists purley of Invoker.exe that I usually copy to winnt\system32 so its always in the path variable)and is free.

The only problem that all of these applications have in common is that there is not a “code” link from the application to the service. A service is created by Invoker (and the others) that can start and stop the app, but if the app crashes itself out then often (if not always) the service will still show as running.

Cheers
Colin.

Is this FireDaemon still the recommend means of getting WD to run as a service on an XP Pro box without having to manually log into the OS first? Or is there a better way to do this? I’d like to be able to allow my box to reboot (power outage, reboot via RDC, etc) & have WD come up. As it is now, I have to manually log in befor eit’ll start.

Thanks,
pat----

I haven’t tried FireDaemon but if you’re willing to live with a reduced security configuration you can get XP to automatically logon with a specific user account. Easiest way to configure this is with TweakUI which is a free download from Microsoft. You can make it a little more secure by running a startup script that will automatically lock the workstation as soon as you’ve logged in.

Julian

I’ll have to take a look at TweakUI … but will it log on a user with a password? I need a password because I’ll be managing this PC remotely via “Remote Desktop Control” since it’ll be in the living room w/o a keyboard, mouse or monitor.

Thanks,
pat----

[quote author=psklenar link=topic=3681.msg50294#msg50294 date=1107008361]
but will it log on a user with a password?

Just discovered that as the notice of your posting came in. :slight_smile:

This is very good! Thank you!

pat----

THANK YOU THANK YOU THANK YOU!!!

:slight_smile:

I now have WD running on an XP Pro box that is out in the living room (where my wireless Davis gets best reception). It’s running without a keyboard, mouse or monitor attached. I can RDC into it from my regular PC back in the office. Upon a reboot, I’m automatically logged in and WD starts. All is well in my world this morning. :slight_smile:

Thank you to everyone who’s been so helpful!!!

pat----

I am running WD on a machine running Windows 2003 Server, which is here in my office pulling data from my WeatherLinkIP device located a couple of hundred miles away. Everything is working nicely, BTW. Check it out here: http://loversleap.org/

I have been using “AlwaysUp” to run WD as a service for the last 2 weeks (it has a 30-day eval). Seems to work fine, although I am remain a little wary that WD is not entirely clean when it exits. Not that I expect WD to exit, but you never know!

From other posts on this forum, it seems that firedaemon has been the “run as a service” tool of choice for WD. When I investigated, I found that AlwaysUp appears to be a little cleaner (and cheaper to boot). Anyone have any comments, experience, etc?

Thanks in advance.

When WD shuts down of recent versions 10.37P Build 95 onwards or something, it has closed all companion programs and fully exited itself. It is now Version 10.37Q Build 00. It is behaving much better for most folks since a new Compiler was used.

[quote author=johnradams link=topic=3681.msg388494#msg388494 date=1287449284]
I am running WD on a machine running Windows 2003 Server, which is here in my office pulling data from my WeatherLinkIP device located a couple of hundred miles away. Everything is working nicely, BTW. Check it out here: http://loversleap.org/

I have been using “AlwaysUp” to run WD as a service for the last 2 weeks (it has a 30-day eval). Seems to work fine, although I am remain a little wary that WD is not entirely clean when it exits. Not that I expect WD to exit, but you never know!

From other posts on this forum, it seems that firedaemon has been the “run as a service” tool of choice for WD. When I investigated, I found that AlwaysUp appears to be a little cleaner (and cheaper to boot). Anyone have any comments, experience, etc?

Have you ever tried using the windows server 2003 build in Task Scheduler? Works like a dream!

I have tried “AlwaysUp” and is creates a service but the is no interactive display for the user - comes up with and error but the WD service is running.
Any help on this problem would be appreciated
Thanks
WJR77

Does the service belong to the same user that is trying to view the display?

Yes the same user.
However I am starting the program in the “start user mode” and using auto-login and auto-lock.
This satisfies the situation
Thanks
WJR77