some code are removed by mistake
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
e541c4db69
commit
d409e1147e
@ -42,6 +42,7 @@ use winapi::{
|
|||||||
winnt::{
|
winnt::{
|
||||||
TokenElevation, HANDLE, PROCESS_QUERY_LIMITED_INFORMATION, TOKEN_ELEVATION, TOKEN_QUERY,
|
TokenElevation, HANDLE, PROCESS_QUERY_LIMITED_INFORMATION, TOKEN_ELEVATION, TOKEN_QUERY,
|
||||||
},
|
},
|
||||||
|
winreg::HKEY_CURRENT_USER,
|
||||||
winuser::*,
|
winuser::*,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -962,9 +963,14 @@ pub fn update_me() -> ResultType<()> {
|
|||||||
fn get_after_install(exe: &str) -> String {
|
fn get_after_install(exe: &str) -> String {
|
||||||
let app_name = crate::get_app_name();
|
let app_name = crate::get_app_name();
|
||||||
let ext = app_name.to_lowercase();
|
let ext = app_name.to_lowercase();
|
||||||
|
|
||||||
// reg delete HKEY_CURRENT_USER\Software\Classes for
|
// reg delete HKEY_CURRENT_USER\Software\Classes for
|
||||||
// https://github.com/rustdesk/rustdesk/commit/f4bdfb6936ae4804fc8ab1cf560db192622ad01a
|
// https://github.com/rustdesk/rustdesk/commit/f4bdfb6936ae4804fc8ab1cf560db192622ad01a
|
||||||
// and https://github.com/leanflutter/uni_links_desktop/blob/1b72b0226cec9943ca8a84e244c149773f384e46/lib/src/protocol_registrar_impl_windows.dart#L30
|
// and https://github.com/leanflutter/uni_links_desktop/blob/1b72b0226cec9943ca8a84e244c149773f384e46/lib/src/protocol_registrar_impl_windows.dart#L30
|
||||||
|
let hcu = winreg::RegKey::predef(HKEY_CURRENT_USER);
|
||||||
|
hcu.delete_subkey_all(format!("Software\\Classes\\{}", exe))
|
||||||
|
.ok();
|
||||||
|
|
||||||
format!("
|
format!("
|
||||||
chcp 65001
|
chcp 65001
|
||||||
reg add HKEY_CLASSES_ROOT\\.{ext} /f
|
reg add HKEY_CLASSES_ROOT\\.{ext} /f
|
||||||
|
Loading…
x
Reference in New Issue
Block a user