protected override Installer CreateUninstaller(HostSettings settings, string commandLine)
		{
			var baseInstallers = new Installer[]
			{
				CreateServiceInstaller(settings, new string[] {}, HostStartMode.Automatic),
				CreateServiceProcessInstaller(ServiceAccount.LocalService, "", "")
			};

			var mainInstaller = new HostInstaller(settings, commandLine, baseInstallers);

			return CreateTransactedInstaller(mainInstaller);
		}
Exemplo n.º 2
0
        protected override Installer CreateUninstaller(HostSettings settings, string commandLine)
        {
            var baseInstallers = new Installer[]
            {
                CreateServiceInstaller(settings, new string[] {}, HostStartMode.Automatic),
                CreateServiceProcessInstaller(null, null, null)
            };

            var mainInstaller = new HostInstaller(settings, commandLine, baseInstallers);

            return(CreateTransactedInstaller(mainInstaller));
        }
		protected override Installer CreateInstaller(InstallHostSettings settings, string commandLine)
		{
			var baseInstallers = new Installer[]
			{
				CreateServiceInstaller(settings, settings.Dependencies, settings.StartMode),
				CreateServiceProcessInstaller(settings.Account, settings.Username, settings.Password)
			};

			foreach (var installer in baseInstallers)
			{
				var eventLogInstallers = installer.Installers.OfType<EventLogInstaller>().ToArray();

				foreach (var eventLogInstaller in eventLogInstallers)
				{
					installer.Installers.Remove(eventLogInstaller);
				}
			}

			var mainInstaller = new HostInstaller(settings, commandLine, baseInstallers);

			return CreateTransactedInstaller(mainInstaller);
		}
Exemplo n.º 4
0
        protected override Installer CreateInstaller(InstallHostSettings settings, string commandLine)
        {
            var baseInstallers = new Installer[]
            {
                CreateServiceInstaller(settings, settings.Dependencies, settings.StartMode),
                CreateServiceProcessInstaller(settings.Credentials?.Account, settings.Credentials?.Username, settings.Credentials?.Password)
            };

            foreach (var installer in baseInstallers)
            {
                var eventLogInstallers = installer.Installers.OfType <EventLogInstaller>().ToArray();

                foreach (var eventLogInstaller in eventLogInstallers)
                {
                    installer.Installers.Remove(eventLogInstaller);
                }
            }

            var mainInstaller = new HostInstaller(settings, commandLine, baseInstallers);

            return(CreateTransactedInstaller(mainInstaller));
        }