{"record":{"id":"54971d2aadcd5ec9","repo":"zed-industries/zed","slug":"failed-to-start-installer","errorCode":null,"errorMessage":"failed to start installer: {:?}","messagePattern":"failed to start installer: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/auto_update/src/auto_update.rs","lineNumber":1280,"sourceCode":"        .parent()\n        .context(\"No parent dir for Zed.exe\")?\n        .to_owned();\n\n    // keep in sync with crates/auto_update_helper/src/updater.rs\n    _ = smol::fs::remove_dir(parent.join(\"updates\")).await;\n    _ = smol::fs::remove_dir(parent.join(\"install\")).await;\n    _ = smol::fs::remove_dir(parent.join(\"old\")).await;\n\n    Ok(())\n}\n\nasync fn install_release_windows(downloaded_installer: &Path) -> Result<Option<PathBuf>> {\n    let mut cmd = new_command(downloaded_installer);\n    cmd.arg(\"/verysilent\")\n        .arg(\"/update=true\")\n        .arg(\"/MERGETASKS=!desktopicon\");\n    let output = cmd.output().await?;\n    anyhow::ensure!(\n        output.status.success(),\n        \"failed to start installer: {:?}\",\n        String::from_utf8_lossy(&output.stderr)\n    );\n    // We return the path to the update helper program, because it will\n    // perform the final steps of the update process, copying the new binary,\n    // deleting the old one, and launching the new binary.\n    let helper_path = std::env::current_exe()?\n        .parent()\n        .context(\"No parent dir for Zed.exe\")?\n        .join(\"tools\")\n        .join(\"auto_update_helper.exe\");\n    Ok(Some(helper_path))\n}\n\npub async fn finalize_auto_update_on_quit() {\n    let Some(installer_path) = std::env::current_exe()\n        .ok()","sourceCodeStart":1262,"sourceCodeEnd":1298,"githubUrl":"https://github.com/zed-industries/zed/blob/bc538def4545534201bbfcac4e95ac34ea6501b6/crates/auto_update/src/auto_update.rs#L1262-L1298","documentation":"Windows install step: the downloaded installer is executed with `/verysilent /update=true /MERGETASKS=!desktopicon`; a non-zero exit code fails with the installer's stderr. The helper path (auto_update_helper.exe) is only returned on success.","triggerScenarios":"The Inno Setup installer exits non-zero - elevation denied for the install location, antivirus blocking the new installer binary, another installer instance running, or a corrupted download.","commonSituations":"Antivirus quarantining the freshly downloaded installer; insufficient privileges writing to the install dir; a previous Zed installer still running; partial download.","solutions":["Retry the update; transient installer exits (locked files) often clear.","Run the downloaded installer manually from the installer temp dir to see its UI error.","Whitelist Zed in antivirus/endpoint protection.","Ensure the user can write to the install directory or reinstall per-user."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"anyhow::ensure!(downloaded_installer.exists(), \"installer binary missing\");\nif is_process_running(\"Zed-setup.exe\") {\n    // wait or terminate before launching a second silent install\n}","typeGuard":null,"tryCatchPattern":"on \"failed to start installer\", retry once after other installer instances exit; if antivirus is suspected, prompt to whitelist and re-run; as a last resort, launch the installer UI manually to read the error.","preventionTips":["Whitelist the Zed install dir and downloads in antivirus","Do not launch updates from two places at once","Keep write access to the install directory"],"tags":["windows","installer","inno-setup","auto-update","permissions"],"backgroundTag":null,"analyzedSha":"bc538def4545534201bbfcac4e95ac34ea6501b6","analyzedAt":"2026-08-16T07:30:46.435Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}