示例#1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public QueryEntry(ISoftware sw, DetectedSoftware _detected, bool _needsUpdate, ApplicationType _type)
 {
     software    = sw;
     detected    = _detected;
     needsUpdate = _needsUpdate;
     type        = _type;
 }
示例#2
0
        /// <summary>
        /// Creates a process instance that can be used to perform the update.
        /// </summary>
        /// <param name="downloadedFile">path to the downloaded installer file</param>
        /// <param name="detected">info about the detected software</param>
        /// <returns>Returns a process instance ready to start, if successful.
        /// Returns null, if an error occurred.</returns>
        public override Process createInstallProccess(string downloadedFile, DetectedSoftware detected)
        {
            if (string.IsNullOrWhiteSpace(downloadedFile))
            {
                return(null);
            }

            var proc = new Process();

            proc.StartInfo.FileName  = downloadedFile;
            proc.StartInfo.Arguments = silentSwitches;
            return(proc);
        }
示例#3
0
        /// <summary>
        /// Creates a process instance that can be used to perform the update.
        /// </summary>
        /// <param name="downloadedFile">path to the downloaded installer file</param>
        /// <param name="detected">info about detected software</param>
        /// <returns>Returns a process instance ready to start, if successful.
        /// Returns null, if an error occurred.</returns>
        public override Process createInstallProccess(string downloadedFile, DetectedSoftware detected)
        {
            if (string.IsNullOrWhiteSpace(downloadedFile))
            {
                return(null);
            }

            var proc = new Process();

            proc.StartInfo.FileName  = downloadedFile;
            proc.StartInfo.Arguments = silentSwitches;
            if (!string.IsNullOrWhiteSpace(detected.installPath))
            {
                proc.StartInfo.Arguments += " /D " + utility.Strings.removeTrailingBackslash(detected.installPath);
            }
            return(proc);
        }
示例#4
0
        /// <summary>
        /// Creates a process instance that can be used to perform the update.
        /// </summary>
        /// <param name="downloadedFile">path to the downloaded installer file</param>
        /// <param name="detected">info about detected software</param>
        /// <returns>Returns a process instance ready to start, if successful.
        /// Returns null, if an error occurred.</returns>
        public override Process createInstallProccess(string downloadedFile, DetectedSoftware detected)
        {
            if (string.IsNullOrWhiteSpace(downloadedFile))
            {
                return(null);
            }

            var proc = new Process();

            proc.StartInfo.FileName = "msiexec.exe";
            if (!string.IsNullOrWhiteSpace(detected.installPath))
            {
                proc.StartInfo.Arguments = "/i \"" + downloadedFile
                                           + "\" INSTALLLOCATION=\"" + utility.Strings.removeTrailingBackslash(detected.installPath) + "\" " + silentSwitches;
            }
            else
            {
                proc.StartInfo.Arguments = "/i \"" + downloadedFile + "\" " + silentSwitches;
            }
            return(proc);
        }
示例#5
0
 /// <summary>
 /// Creates a process instance that can be used to perform the update.
 /// </summary>
 /// <param name="downloadedFile">path to the downloaded installer file</param>
 /// <param name="detected">info about the detected software</param>
 /// <returns>Returns a process instance ready to start, if successful.
 /// Returns null, if an error occurred.</returns>
 public abstract Process createInstallProccess(string downloadedFile, DetectedSoftware detected);