[feat] hide window of cmd calling
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user