diff --git a/Windows/CS/Framework4.0/Updater/src/main.rs b/Windows/CS/Framework4.0/Updater/src/main.rs index 8a6f805..3fc5d50 100644 --- a/Windows/CS/Framework4.0/Updater/src/main.rs +++ b/Windows/CS/Framework4.0/Updater/src/main.rs @@ -66,6 +66,20 @@ async fn upgrade(debug_mode: bool) { async fn main() { let config = load_config(); + if !config.debug_mode { + #[cfg(windows)] + { + use windows::Win32::System::Console; + use windows::Win32::Foundation::HWND; + unsafe { + let console = Console::GetConsoleWindow(); + if console != HWND::default() { + let _ = Console::FreeConsole(); + } + } + } + } + if config.debug_mode { let mut interval = time::interval(time::Duration::from_secs(300)); loop {