private void saveSettingsToolStripMenuItem_Click(object sender, EventArgs e) { string tempFile = Path.GetTempFileName(); _settings.Save(tempFile); ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "ImageSettingsElevatedProxy.exe"; startInfo.UseShellExecute = true; startInfo.Verb = "runas"; startInfo.Arguments = "\"" + DEFAULT_CONFIG_PATH + "\" \"" + tempFile + "\""; Process process = Process.Start(startInfo); process.WaitForExit(); File.Delete(tempFile); }
private void saveSettingsToolStripMenuItem_Click(object sender, EventArgs e) { //TODO: Refactor into a separate, *elevated* process _settings.Save(DEFAULT_CONFIG_PATH); }