Пример #1
0
        static void Main(string[] args)
        {
            // TODO: Add code to start application here


            #region Testing
            //  Testing --------------
            string ServicePath;
            string ServiceName;
            string ServiceDisplayName;

            //path to the service that you want to install
            ServicePath        = @"C:\build\service\Debug\Service.exe";
            ServiceName        = "Service Name";
            ServiceDisplayName = "Service Display Name";
            ServiceAdmin c = new ServiceAdmin();
            c.InstallService(ServicePath, ServiceName, ServiceDisplayName);
            Console.Read();
            // Testing --------------
            #endregion Testing
        }
Пример #2
0
        static void Main(string[] args)
        {
            // TODO: Add code to start application here

            #region Testing
            //  Testing --------------
            string ServicePath;
            string ServiceName;
            string ServiceDisplayName;

            //path to the service that you want to install
            ServicePath = @"C:\build\service\Debug\Service.exe";
            ServiceName= "Service Name";
            ServiceDisplayName="Service Display Name";
            ServiceAdmin c = new ServiceAdmin();
            c.InstallService(ServicePath, ServiceName, ServiceDisplayName);
              			Console.Read();
            // Testing --------------
            #endregion Testing
        }