[feat] hide window of cmd calling

This commit is contained in:
Purp1e
2025-03-22 01:16:39 +08:00
parent f92fc6719c
commit edc0c936b0

View File

@@ -7,6 +7,7 @@ const CREATE_NO_WINDOW: u32 = 0x08000000;
pub fn kill(name: &str) -> String {
Command::new("taskkill")
.args(&["/IM", name, "/F"])
.creation_flags(CREATE_NO_WINDOW)
.output()
.unwrap();
@@ -16,6 +17,7 @@ pub fn kill(name: &str) -> String {
pub fn run_steam() -> std::io::Result<std::process::Output> {
Command::new("cmd")
.args(&["/C", "start", "steam://run"])
.creation_flags(CREATE_NO_WINDOW)
.output()
}