diff --git a/src/platform/windows/installer_files.rs b/src/platform/windows/installer_files.rs index 20755e41a..718558608 100644 --- a/src/platform/windows/installer_files.rs +++ b/src/platform/windows/installer_files.rs @@ -151,7 +151,7 @@ fn create_protected_file(path: &Path) -> ResultType { fn duplicate_cleanup_handle(file: &File) -> ResultType> { let mut handle = HANDLE::default(); - // Retain deletion capability, not a writable handle, while waiting for UAC. + // Retain deletion capability, not a writable handle, until the files are released to cmd. unsafe { let process = GetCurrentProcess(); DuplicateHandle( diff --git a/src/platform/windows/installer_handoff.rs b/src/platform/windows/installer_handoff.rs index 33424dc03..40585922c 100644 --- a/src/platform/windows/installer_handoff.rs +++ b/src/platform/windows/installer_handoff.rs @@ -100,8 +100,9 @@ pub(super) fn run_cmds(cmds: impl Into, show: bool, tip: &str) directory::create(&directory)?; // cmd cannot open the BAT or copy its inputs while a DELETE-capable handle is open, so // close them before launching it; a cancelled UAC prompt then leaves the files behind. - // Holding them until cmd read a release signal from a named pipe made F-Secure's - // behavior detection end the elevated cmd (#16840, #16842). The DACL still protects them. + // Holding them until cmd read a release signal from a named pipe failed under F-Secure's + // behavior detection, which closed cmd's end first (#16840, #16842). The file DACLs and + // the parent directory's permissions still keep unelevated users from changing them. script.release_files(); let process = launch_elevated(&cmd_path, ¶meters, show).map_err(|err| { log::debug!("Failed to launch elevated installer: {err:#}");