kill broker on exit service

Signed-off-by: dignow <linlong1265@gmail.com>
This commit is contained in:
dignow 2023-07-08 16:01:25 +08:00
parent 1648895156
commit 8bb851704a

View File

@ -2161,9 +2161,11 @@ pub fn uninstall_service(show_new_window: bool) -> bool {
sc stop {app_name}
sc delete {app_name}
if exist \"%PROGRAMDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\{app_name} Tray.lnk\" del /f /q \"%PROGRAMDATA%\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\{app_name} Tray.lnk\"
taskkill /F /IM {broker_exe}
taskkill /F /IM {app_name}.exe{filter}
",
app_name = crate::get_app_name(),
broker_exe = WIN_MAG_INJECTED_PROCESS_EXE,
);
if let Err(err) = run_cmds(cmds, false, "uninstall") {
Config::set_option("stop-service".into(), "".into());