Skip to content

Commit

Permalink
disable windows service install/uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
rustdesk committed Jun 5, 2023
1 parent 14541fd commit 594ce02
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/platform/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1309,11 +1309,13 @@ pub fn add_recent_document(path: &str) {
}

pub fn is_installed() -> bool {
let (_, _, _, exe) = get_install_info();
std::fs::metadata(exe).is_ok()
/*
use windows_service::{
service::ServiceAccess,
service_manager::{ServiceManager, ServiceManagerAccess},
};
let (_, _, _, exe) = get_install_info();
if !std::fs::metadata(exe).is_ok() {
return false;
}
Expand All @@ -1326,6 +1328,7 @@ pub fn is_installed() -> bool {
}
}
return false;
*/
}

pub fn get_reg(name: &str) -> String {
Expand Down
2 changes: 2 additions & 0 deletions src/ui_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ pub fn set_option(key: String, value: String) {
return;
}
}
/*
#[cfg(any(target_os = "windows"))]
{
if crate::platform::is_installed() {
Expand All @@ -294,6 +295,7 @@ pub fn set_option(key: String, value: String) {
return;
}
}
*/
}
if value.is_empty() {
options.remove(&key);
Expand Down

0 comments on commit 594ce02

Please sign in to comment.