mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-25 22:21:01 +03:00
fix: remote printer, update install option (#11461)
* fix: remote printer, update install option Signed-off-by: fufesou <linlong1266@gmail.com> * Add comments Signed-off-by: fufesou <linlong1266@gmail.com> * Add comments Signed-off-by: fufesou <linlong1266@gmail.com> * Win, run_cmds, remove extra whitespace and newline Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
@@ -2438,6 +2438,16 @@ pub fn main_set_common(_key: String, _value: String) {
|
||||
(false, err)
|
||||
}
|
||||
};
|
||||
if success {
|
||||
// Use `ipc` to notify the server process to update the install option in the registry.
|
||||
// Because `install_update_printer()` may prompt for permissions, there is no need to prompt again here.
|
||||
if let Err(e) = crate::ipc::set_install_option(
|
||||
crate::platform::REG_NAME_INSTALL_PRINTER.to_string(),
|
||||
"1".to_string(),
|
||||
) {
|
||||
log::error!("Failed to set install printer option: {}", e);
|
||||
}
|
||||
}
|
||||
let data = HashMap::from([
|
||||
("name", serde_json::json!("install-printer-res")),
|
||||
("success", serde_json::json!(success)),
|
||||
|
||||
Reference in New Issue
Block a user