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?
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.