Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have an application that needs to be running all the time, and automatically restart when the server reboots. Sounds like a great job for a Windows service! The only problem is that the company that created this software was not so thoughtful :-(

Does anyone have any expereince with getting a regualr windows application to run as a service? I have found a product from Eltima Network that appears to target this problem.

Does anyone have any expereince with this product, or another product that accomplishs the same goal? Perhaps a free, open source, or Microsoft solution?

Thanks!

share|improve this question

3 Answers 3

up vote 2 down vote accepted

That commercial offering you're referring to is "adding value" by being nice to applications it hosts-- trying to close them gracefully when the service control manager asks it to "stop", etc.

You can get a lot of that functionality from something like NSSM - the Non-Sucking Service Manager, SRVANY (from various Windows resource kits), or any other number of similiar projects out there. What you won't get from those tools is obsessive attention to shutting down applications cleanly like that commercial tool you mentioned.

share|improve this answer
    
Thanks for that bit of insight Evan. Congrat's on hitting 20k –  Richard West Oct 16 '09 at 19:21
    
Thanks, Richard. My obsession with Server Fault is sorta apparent, isn't it... >smile< –  Evan Anderson Oct 16 '09 at 21:14

Pitty you don't tel us what version of Windows your running, 2000, 2003 or 2008.

I had to run a simple program as service once on a Windows 2003 server and used srvany.exe for it. Its part of the Windows Server 2003 resource kit that you can download for free from the microsoft download site.

Windows Server 2003 resource kit download.

A KB article of srvany for Windows 2000 that might get you on track. support.microsoft.com/kb/137890

Hopes this helps you out a bit!

share|improve this answer
    
Here's some rep so you can create more than one link next time. As the KB article shows, srvany has been around for a long time and I can't see it disappearing any time soon. –  John Gardeniers Oct 16 '09 at 23:02

You can create your own Windows Service in C#. Its very simple. Then start up your app via the service on service startup & stop the app on service shutdown.

share|improve this answer
    
It can be done in any language, not just C#, but such an answer is not really appropriate for a non-dev site such as this. –  John Gardeniers Oct 16 '09 at 22:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.