Ejemplo n.º 1
0
        /// <summary>
        /// Executes the task.
        /// </summary>
        /// <param name="environment">The environment.</param>
        /// <param name="executablePath">The executable path.</param>
        /// <param name="serviceName">Name of the service.</param>
        /// <param name="mode">The task mode.</param>
        public static void Execute(
            ITaskContext environment,
            string executablePath,
            string serviceName,
            InstallWindowsServiceMode mode)
        {
            InstallWindowsServiceTask task = new InstallWindowsServiceTask(executablePath, serviceName, mode);

            task.Execute(environment);
        }
Ejemplo n.º 2
0
        public TRunner InstallWindowsService(
            string executablePath,
            string serviceName,
            InstallWindowsServiceMode mode,
            TimeSpan serviceUninstallationWaitTime)
        {
            InstallWindowsServiceTask task = new InstallWindowsServiceTask(executablePath, serviceName, mode);

            task.ServiceUninstallationWaitTime = serviceUninstallationWaitTime;
            return(RunTask(task));
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="InstallWindowsServiceTask"/> class
 /// with the specified path to the Windows service executable.
 /// </summary>
 /// <param name="executablePath">The executable path.</param>
 /// <param name="serviceName">The Windows service name.</param>
 /// <param name="mode">Mode of the installation.</param>
 public InstallWindowsServiceTask(string executablePath, string serviceName, InstallWindowsServiceMode mode)
 {
     this.executablePath = executablePath;
     this.serviceName    = serviceName;
     this.mode           = mode;
 }