We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27bf49e commit 875eab3Copy full SHA for 875eab3
1 file changed
launcher/src/modules/monitor.rs
@@ -1,4 +1,5 @@
1
use crate::config::MonitorConfig;
2
+use std::os::windows::process::CommandExt;
3
use std::process::Command;
4
5
/// Détermine si le launcher doit s'exécuter en mode jeu (`true`) ou bureau (`false`).
@@ -19,6 +20,7 @@ fn detect(name: &str) -> bool {
19
20
let cmd = r#"Get-WmiObject -Namespace root\wmi -Class WmiMonitorID | ForEach-Object { ($_.UserFriendlyName | Where-Object {$_} | ForEach-Object {[char]$_}) -join '' }"#;
21
let output = Command::new("powershell")
22
.args(["-NoProfile", "-NonInteractive", "-Command", cmd])
23
+ .creation_flags(0x08000000)
24
.output();
25
match output {
26
Ok(o) => String::from_utf8_lossy(&o.stdout)
0 commit comments