Click here to Skip to main content
15,867,957 members
Articles / Desktop Programming / Windows Forms

Deployer

Rate me:
Please Sign up or sign in to vote.
4.43/5 (17 votes)
30 Mar 2012Apache14 min read 81.8K   543   91  
Automate deployment of Windows Services, ClickOnce, and other .NET applications.
using System.Collections.Generic;
using System.ServiceProcess;
using System.Text;

namespace WindowsService
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
            ServiceBase[] ServicesToRun;

            // More than one user Service may run within the same process. To add
            // another service to this process, change the following line to
            // create a second service object. For example,
            //
            //   ServicesToRun = new ServiceBase[] {new Service1(), new MySecondUserService()};
            //
            ServicesToRun = new ServiceBase[] { new SomeUniqueName() };

            ServiceBase.Run(ServicesToRun);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Chief Technology Officer
United States United States
If you liked this article, consider reading other articles by me. For republishing article on other websites, please contact me by leaving a comment.

Comments and Discussions