public void ExtractInstallerFiles() { int exitCode = ProcessExecutor.RunProcess($@"{Environment.CurrentDirectory}\7-Zip\7z.exe", $"x \"{InstallerFile}\" -o\"{ExtractedInstallerDirectory}\""); //https://sevenzip.osdn.jp/chm/cmdline/exit_codes.htm //Add messages for each possibility? if (exitCode == 7) { throw new Exception("Extraction failed. 7-Zip Command line error"); } }
public void UninstallIfSelected() { if (_uninstall && !string.IsNullOrWhiteSpace(UninstallCommand)) { if (_windowsInstaller) { ProcessExecutor.RunProcess(_uninstallExe, $"{_uninstallArguments} /quiet /norestart REBOOT=ReallySuppress"); } else { //ProcessExecutor.RunProcess(_uninstallExe, _uninstallArguments); StaticViewModel.AddDebugMessage($"Non-Windows Uninstaller for {DisplayName} not supported"); } } }
public void SetStartMode() { if (_exists) { using (ServiceController serviceController = new ServiceController(Name)) { serviceController.Refresh(); if (StartMode != serviceController.StartType) { //It's this or WMI... ProcessExecutor.RunProcess("sc.exe", $"config \"{Name}\" start= {GetStartModeCommandString(StartMode)}"); serviceController.Refresh(); StartMode = serviceController.StartType; } } } }
private void RadeonSoftwareCli(string arugument) { ProcessExecutor.RunProcess(_cnDir.FullName + RADEON_SOFTWARE_CLI_FILE_NAME, arugument); }