Skip to content

Commit bc5e93c

Browse files
committed
优化用户体验,隐藏一闪而过的cmd窗口
1 parent 47a0728 commit bc5e93c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src-tauri/src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::env;
66
use std::fs;
77
use std::io;
88
use std::io::Write;
9+
use std::os::windows::process::CommandExt;
910
use std::process::exit;
1011
use std::process::{Command, Stdio};
1112
use winreg::enums::*;
@@ -144,6 +145,7 @@ fn gui_cli() {
144145
// SlimeNull <slimenull@outlook.com> 提交的代码
145146
fn restart_explorer() {
146147
let mut cmd = Command::new("cmd.exe")
148+
.creation_flags(0x08000000)
147149
.stdin(Stdio::piped())
148150
.stdout(Stdio::null())
149151
.spawn()

0 commit comments

Comments
 (0)