public static AppDirectoryItem ( string FileName ) : string | ||
FileName | string | |
return | string |
private void wizardControl1_Finished(object sender, EventArgs e) { string ExePath = Utilities.AppDirectoryItem("Updater.exe"); string filesForExtract = String.Empty; foreach (string item in this.UpdateLocalPaths) { filesForExtract += $"{item};"; } using (Process proc = new Process()) { var psi = new ProcessStartInfo { FileName = ExePath, Verb = "runas", UseShellExecute = true, Arguments = $"/env /user:Administrator \"{ExePath}\" UP:{filesForExtract}" }; proc.StartInfo = psi; proc.Start(); //if (proc.ExitCode == -1) // System.Windows.MessageBox.Show("Error in Update!", "Error", MessageBoxButton.OK, MessageBoxImage.Error); } System.Windows.Application.Current.Shutdown(); }