public WindowsServiceWithInstallerOperation(string serviceName, string displayName, string sourceDir, string destDir, string relativeExePath, string installerParams, WindowsServiceOptions.WindowsServiceOptionValues options)
     : base(serviceName, displayName, sourceDir, destDir, relativeExePath, options)
 {
     _installerParams = installerParams;
 }
Example #2
0
        public IOfferRemoteDeployment WindowsService(string serviceName, string displayName, string sourceDir, string destDir, string relativeExePath, Action<IOfferWindowsServiceOptions> options)
        {
            var winServiceOptions = new WindowsServiceOptions();
            if (options != null)
            {
                options(winServiceOptions);
            }

            var winServiceOperation = new WindowsServiceOperation(serviceName, displayName, sourceDir, destDir, relativeExePath, winServiceOptions.Values);
            AddOperation(winServiceOperation);
            return this;
        }
Example #3
0
 public WindowsServiceOperation(string serviceName, string displayName, string sourceDir, string destDir, string relativeExePath, WindowsServiceOptions.WindowsServiceOptionValues values)
     : base(serviceName, displayName, sourceDir, destDir, relativeExePath, values)
 {
 }
        /// <summary>
        /// Will deploy and start provided Windows Service with provided options using the built-in installer.
        /// </summary>
        /// <param name="serviceName"></param>
        /// <param name="sourceDir"></param>
        /// <param name="destDir"></param>
        /// <param name="relativeExePath"></param>
        /// <param name="displayName"></param>
        /// <param name="installerParams"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        public static IOfferRemoteDeployment WindowsServiceWithInstaller(this IOfferRemoteDeployment remote, string serviceName, string displayName, string sourceDir, string destDir, string relativeExePath, string installerParams, Action<IOfferWindowsServiceOptions> options)
        {
            var winServiceOptions = new WindowsServiceOptions();
            if (options != null)
            {
                options(winServiceOptions);
            }

            var winServiceOperation = new WindowsServiceWithInstallerOperation(serviceName, displayName, sourceDir, destDir, relativeExePath, installerParams, winServiceOptions.Values);
            Configure.Operation(remote, winServiceOperation);
            //Configure.DeploymentOperations.AddOperation(winServiceOperation);
            return remote;
        }