Esempio n. 1
0
        private void Install()
        {
            Console.Out.WriteLine("Installing service {0}", _serviceName);
            var location = Assembly.GetExecutingAssembly().Location;

            Log.Debug($"ServiceConsoleCommand:RunCommand {location}");
            ServiceInstaller.InstallAndStart(_serviceName, null, $@"{location} {AsServiceArgument}");
            Console.Out.WriteLine("Service {0} is now installed.", _serviceName);
        }