Exemple #1
0
        static void Start()
        {
// TODO: Add code to start application here
            #region Testing
// Testing --------------
            string svcPath;
            string svcName;
            string svcDispName;
//path to the service that you want to install
            svcPath     = @"C:\build\service\Debug\Service.exe";
            svcDispName = "Service Display Name";
            svcName     = "Service Name";
            ServiceInstaller c = new ServiceInstaller();
            c.InstallService(svcPath, svcName, svcDispName);
            Console.Read();
//Testing --------------
            #endregion Testing
        }