Best way to deploy a service.

Posted on 2006-04-14
Last Modified: 2008-02-01
I have an application that I want to start when ever the computer starts up.  This application will process Text Files in a given directory and upload the data to a SQL server database. What would be the best approach for deploying this application as I want as little user interaction as possible?  The only user interface will be a system tray Icon which will have a status context menu.

If I could use click once deployment I could hard code in the connection string to the database if the connection ever changes I just redeploy the application. Does clickonce issue a single Exe file that I could use in a bat file?

Another option would be to start the application passing the connection string as the parameter.  I would place the startup script in the Startup folder.

What about a windows service as an option?

Any guidance would be appreciated.

Thanks in advance,

Question by:DigitalDan3
    LVL 37

    Accepted Solution

    This definitely sounds like a windows service would be the best fit for you (doesn't need a user logged in)

    I would include a front end app that communicates with the windows service to show its status, it could also allow for configuration (i.e. saves a connection string encrypted in the registry)


    LVL 6

    Assisted Solution

    Based on your description of the task, a Windows Service seems like the best way to go.  You can use the .Net NotifyIcon to show the application icon in the system tray.  Also, a windows service can be scheduled so you can set the process to run at a certain day, time etc....  

    If you are using VS 2005( .NET 2.0) then one click deployment will work.  When the service starts, it can check for any updates.  You can configure the one-click deployment to perform a 'Silent Install'.  The user would be unaware of the update.
    LVL 37

    Expert Comment


    Maybe I am missing something here.

    You suggest that the service use a notifyicon? This is flat out bad practice (if it works at all, it requires interact with desktop to be enabled which is highly frowned upon due to security reasons)

    As for "scheduling" windows services this is a highly non-standard practice .. most services are up and running on their own, handling any scheduling on their own or the task is implemented as a console app and then run from a scheduling service as it produces the same net effect without the overhead and management problems of an additional service.

    As for click once deployment it doesn't support windows services (unless this has recently changed)

    Can you bring up a reference for anything of this?

    LVL 6

    Expert Comment

    Fair enough....   Concerning click-once deployment, here, changes are pushed to the clients using the installer tool on a scheduled basis.  I was under the impression that the Windows Services were developed using click-once deployment.  

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now