mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
Showing window this allows the progress dialog when installing updates elevated
This commit is contained in:
@@ -57,7 +57,7 @@ pub fn apply_package_impl(old_locator: &VelopackLocator, package: &PathBuf, run_
|
||||
let work_dir: Option<String> = None; // same as this process
|
||||
// NB: show_window must be true for dialogs to be shown
|
||||
// https://learn.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-taskdialogindirect#remarks
|
||||
let process_handle = process::run_process_as_admin(&exe_path, args, work_dir, false)?;
|
||||
let process_handle = process::run_process_as_admin(&exe_path, args, work_dir, true)?;
|
||||
|
||||
info!("Waiting (up to 10 minutes) for elevated process (pid: {}) to exit...", process_handle.pid());
|
||||
let result = process::wait_for_process_to_exit(process_handle, Some(Duration::from_secs(10 * 60)))?;
|
||||
|
||||
Reference in New Issue
Block a user