Windows Service OR Win App

I have been told to write a windows service which 'periodically' checking for messages and application updates from the web service.

The user has the choice to download updates and messages automatically or to be prompted to download them when they are available.

Note: A Message may contain documents.

Now my question is is it the right approach to do this using a windows service or windows app/form.

Please help me out on this.

Thanks

kash


Answer this question

Windows Service OR Win App

  • bxs122

    In my opinion, there should not be any problem while using win service as you are going to check for it periodically and the process will be running in background.

    You might need to think of more while trying to prompt as Windows Service does not support UI.



  • McVicar

    Such jobs should be processed in services. Because, the timer for services is more reliable than forms timers. Beside, GUI will consume same thread/process space with your timer based job routine, if you choose Forms approach. Moreover, you can develop another manager application (system tray application would be nice choice).


  • Jiajia

    I am new to windows services, infact this is my first time im trying to write this service... so is it possible for you to show me some example code.


  • Tailor

    Now I have written the windows service which connects to the web service to check for updates. Im checking this on onStart event.

    Let say If there is one update available. How do I inform or alert to user "You have 1 download available."

    Please help me on this.

    Thanks


  • riemerg

    If you are checking this in OnStart event, then you are not cheking it periodically.

    To show the alert you need to think of some alternative as Win Service does not support UI.

    You might like to create a System tray application which will do all for you (as suggested by eax)

    OR may be combination of both.... (need to think of how) if periodic check is done by service and alert is displayed by system tray application.



  • dezrtluver

    Go to codeproject.com and do a search for 'windows service'.

    You'll find a number of example service projects, such as:

    http://www.codeproject.com/dotnet/simplewindowsservice.asp (.net)

    http://www.codeproject.com/system/windows_nt_service.asp (c++)

    Good luck,

    Jim Howard


  • gracias

    hi,

    u can read about the new enhancements done to Service infrastructure at following link :

    http://dotnetwithme.blogspot.com/2007/01/microsoft-vista-services-enhancements.html

    http://DotNetWithMe.blogspot.com
    vikas goyal



  • mjt

    I like creating a console app that I can schedule to run using Scheduled Tasks (Start/All Programs/Accessories/System Tools.

    This allows me to easily change the schedule, frequency the process is run and gives me a way to view when the thing last ran and the status as well as other benifits.

    I also find it easier debugging using the console app as apposed to a service.


  • Windows Service OR Win App