コード例 #1
0
        /// <summary>
        /// Use this for installing packages that are not an MSI (.msi extension). Typically an
        /// executable (.exe) followed by a set of parameters to make the installation
        /// non-interactive (silent).
        /// </summary>
        /// <param name="install"></param>
        /// <param name="packageName">A uniqe package name (DisplayName in Windows Registry) to make this
        /// operation idempotent. If this package name is not correct, ConDep will install this package
        /// on every execution. ConDep looks in these three registry keys for installed software packages:
        /// HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
        /// HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall
        /// HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall</param>
        /// <param name="srcExecutableUri">A URI to the custom package</param>
        /// <param name="exeParams">Parameters needed by the package to install silently, logging etc.</param>
        /// <returns></returns>
        public static IOfferRemoteInstallation Custom(this IOfferRemoteInstallation install, string packageName, Uri srcExecutableUri, string exeParams, Action <IOfferInstallOptions> options = null)
        {
            var installOptions = new InstallOptions();

            if (options != null)
            {
                options(installOptions);
            }
            var exeOperation = new InstallExecutableOperation(packageName, srcExecutableUri, exeParams, installOptions.Values);

            Configure.Operation(install, exeOperation);
            return(install);
        }
コード例 #2
0
        /// <summary>
        /// Use this for installing packages that are not an MSI (.msi extension). Typically an
        /// executable (.exe) followed by a set of parameters to make the installation
        /// non-interactive (silent).
        /// </summary>
        /// <param name="install"></param>
        /// <param name="packageName">A uniqe package name (DisplayName in Windows Registry) to make this
        /// operation idempotent. If this package name is not correct, ConDep will install this package
        /// on every execution. ConDep looks in these three registry keys for installed software packages:
        /// HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall
        /// HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall
        /// HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall</param>
        /// <param name="srcExecutableFilePath">A local file path to the custom package (not a path on target server).</param>
        /// <param name="exeParams">Parameters needed by the package to install silently, logging etc.</param>
        /// <returns></returns>
        public static IOfferRemoteInstallation Custom(this IOfferRemoteInstallation install, string packageName, string srcExecutableFilePath, string exeParams, Action <IOfferInstallOptions> options = null)
        {
            var installOptions = new InstallOptions();

            if (options != null)
            {
                options(installOptions);
            }
            var exeOperation = new InstallExecutableOperation(packageName, srcExecutableFilePath, exeParams, installOptions.Values);

            OperationExecutor.Execute((RemoteBuilder)install, exeOperation);
            return(install);
        }