/// <summary> /// Constructor. /// </summary> public QueryEntry(ISoftware sw, DetectedSoftware _detected, bool _needsUpdate, ApplicationType _type) { software = sw; detected = _detected; needsUpdate = _needsUpdate; type = _type; }
/// <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); }
/// <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); }
/// <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); }
/// <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);