Beispiel #1
0
        public UninstallCommand(WinServiceSettings settings, string commandLine, string instance)
        {
            _settings = settings;
            _commandLine = commandLine;

            if (instance != null)
                _settings.ServiceName = new ServiceName(_settings.ServiceName.Name, instance);
        }
Beispiel #2
0
        private Type _winForm;                   /// <summary>
        /// Initializes a new instance of the <see cref="RunnerConfigurator"/> class.                 /// </summary>

        private RunnerConfigurator()
        {
            _winServiceSettings   = new WinServiceSettings();
            _credentials          = Credentials.LocalSystem;
            _serviceConfigurators = new List <Func <IService> >();
            _runnerAction         = NamedAction.Console;
            _winForm = typeof(ServiceConsole);
        }
Beispiel #3
0
 public static Installer[] BuildInstallers(WinServiceSettings settings)
 {
     var result = new Installer[]
                  {
                      ConfigureServiceInstaller(settings),
                      ConfigureServiceProcessInstaller(settings)
                  };
     return result;
 }
Beispiel #4
0
        public static ServiceProcessInstaller ConfigureServiceProcessInstaller(WinServiceSettings settings)
        {
            var credentials = settings.Credentials;
            var installer = new ServiceProcessInstaller
                            {
                                Username = credentials.Username,
                                Password = credentials.Password,
                                Account = credentials.AccountType
                            };

            return installer;
        }
Beispiel #5
0
        public static ServiceInstaller ConfigureServiceInstaller(WinServiceSettings settings)
        {
            var installer = new ServiceInstaller
                            {
                                ServiceName = settings.ServiceName.FullName,
                                Description = settings.Description,
                                DisplayName = settings.FullDisplayName,
                                ServicesDependedOn = settings.Dependencies.ToArray(),
                                StartType = ServiceStartMode.Automatic
                            };

            return installer;
        }
Beispiel #6
0
        public InstallCommand(WinServiceSettings settings, string commandLine, string instance, string username,
            string password)
        {
            _settings = settings;
            _commandLine = commandLine;

            if (username != null && password != null)
                _settings.Credentials = new Credentials(username, password, ServiceAccount.User);

            if (instance != null)
            {
                _settings.ServiceName = new ServiceName(_settings.ServiceName.Name, instance);
            }
        }
Beispiel #7
0
 public InstallService(WinServiceSettings settings)
 {
     _settings = settings;
 }
 public HostServiceInstaller(WinServiceSettings settings)
 {
     _settings = settings;
 }
Beispiel #9
0
 public UninstallService(WinServiceSettings settings, string commandLine)
 {
     _settings = settings;
     _commandLine = commandLine;
 }
Beispiel #10
0
 public ServiceCommand(IServiceCoordinator coordinator, WinServiceSettings settings)
 {
     _coordinator = coordinator;
     _settings = settings;
 }