From 8462d5eaf7bd6eb746dba95f72b3429a135b5a19 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Tue, 13 Dec 2022 22:47:57 +0100 Subject: feat: Start Northstar properly detached (#112) Simply run cmd with `start "" "PATH/TO/NORTHSTAR_EXE"` Co-authored-by: ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> Co-authored-by: ASpoonPlaysGames <66967891+ASpoonPlaysGames@users.noreply.github.com> --- src-tauri/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src-tauri/src') diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 675a06ef..54f23d93 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -291,11 +291,11 @@ pub fn launch_northstar( || matches!(game_install.install_type, InstallType::ORIGIN) || matches!(game_install.install_type, InstallType::UNKNOWN)) { - let _output = - std::process::Command::new(format!("{}/NorthstarLauncher.exe", game_install.game_path)) - // .args(&["a", "b"]) - .spawn() - .expect("failed to execute process"); + let ns_exe_path = format!("{}/NorthstarLauncher.exe", game_install.game_path); + let _output = std::process::Command::new("C:\\Windows\\System32\\cmd.exe") + .args(&["/C", "start", "", &ns_exe_path]) + .spawn() + .expect("failed to execute process"); return Ok("Launched game".to_string()); } -- cgit v1.2.3