rustdesk/rustdesk · error

The driver inf file "{}" does not exists

Error message

The driver inf file "{}" does not exists

What it means

get_driver_inf_abs_path resolves the absolute path of the RustDesk virtual printer driver INF file (RD_DRIVER_INF_PATH) relative to the current executable's parent directory. This bail fires when that resolved path does not exist on disk, meaning the driver INF file is missing from the installation, so install_update_printer cannot proceed to install or update the printer driver.

Source

Thrown at libs/remote_printer/src/setup/setup.rs:26

use windows_strings::PCWSTR;

lazy_static::lazy_static!(
    static ref SETUP_MTX: Mutex<()> = Mutex::new(());
);

fn get_driver_inf_abs_path() -> ResultType<PathBuf> {
    use crate::RD_DRIVER_INF_PATH;

    let exe_file = std::env::current_exe()?;
    let abs_path = match exe_file.parent() {
        Some(parent) => parent.join(RD_DRIVER_INF_PATH),
        None => bail!(
            "Invalid exe parent for {}",
            exe_file.to_string_lossy().as_ref()
        ),
    };
    if !abs_path.exists() {
        bail!(
            "The driver inf file \"{}\" does not exists",
            RD_DRIVER_INF_PATH
        )
    }
    Ok(abs_path)
}

// Note: This function must be called in a separate thread.
// Because many functions in this module are blocking or synchronous.
// Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.
// Steps:
// 1. Add the local port.
// 2. Check if the driver is installed.
//    Uninstall the existing driver if it is installed.
//    We should not check the driver version because the driver is deployed with the application.
//    It's better to uninstall the existing driver and install the driver from the application.
// 3. Add the printer.
pub fn install_update_printer(app_name: &str) -> ResultType<()> {

View on GitHub (pinned to 91c9fccbb0)

Solutions

  1. Verify the INF file referenced by RD_DRIVER_INF_PATH exists at '<exe parent dir>/...' and reinstall the printer driver component if missing
  2. Reinstall/repair RustDesk so the driver files are extracted to the expected location next to the executable
  3. Ensure the application is launched from its installed directory, not a bare copied binary
  4. Check installer logs / packaging to confirm the driver INF is included in the deployment

Example fix

// ensure the INF ships beside the binary before calling install
let inf = setup::get_driver_inf_abs_path()?;
if !inf.exists() {
    eprintln!("driver INF missing: {}", inf.display());
}
setup::install_update_printer()?;
Defensive patterns

Strategy: validation

Validate before calling

let inf = setup::get_driver_inf_abs_path()?;
if !inf.exists() {
    eprintln!("printer driver INF missing at {}", inf.display());
}

Try / catch

match setup::install_update_printer() {
    Ok(_) => {},
    Err(e) if e.to_string().contains("does not exists") => reinstall_driver(),
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling install_update_printer (which calls get_driver_inf_abs_path) when the file at RD_DRIVER_INF_PATH, resolved from the executable's parent directory, does not exist on disk.

Common situations: Running a partially built or manually copied rustdesk binary without the bundled driver files; an installer that skipped the printer driver component; the exe not located in its normal install layout so the relative INF path resolves elsewhere.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of rustdesk/rustdesk@91c9fccbb0 (2026-09-10). Data as JSON: /api/errors/b1856f65cbcab709. Report an issue: GitHub.