Win Forms program run as Windows Service

Hello,

I've created a small desktop application with VS2010, Win forms. My app is periodically making a backup of some directories. Now the problem is, that I've started this app logged with my user name, which means when I log off, the app will also shut down. (My application is running on Windows server 2003, .NET framework 3.5). So I've come on idea that application should be run as windows service for all users. How can I add my application to windows services, so it can be seen there, amongst other services?

 Windows services
AntonioRodrigoAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ToxaconCommented:
I suggest you write a Windows Service and use the Forms application only to configure or command the service. VS2010 has a ready template for a service.
0
CodeCruiserCommented:
0
rajapandian_81Commented:
Hi,

Refer below links for windows services.
http://www.switchonthecode.com/tutorials/creating-a-simple-windows-service-in-csharp
http://www.codeproject.com/KB/system/WindowsService.aspx

Can you use task scheduler for your need. You can add your application's exe in task scheduler and set time. So that it will run on that particular tiime everyday and will take backup.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.