Best way to deploy a service.

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,

Who is Participating?
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.

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)



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
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.

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?

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.  
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
Visual Basic.NET

From novice to tech pro — start learning today.

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.