[Windows] Use OS.execute to launch a program detached from current process

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By elim

Hi,
I’ve made a launcher/updater in Godot for my game (also Godot) and I would like to launch the game after the update succeeds.
This is already working fine with:
OS.execute(GAME_FILENAME_WIN64, [], false);

However if I try to close the launcher afterward with:
get_tree().quit();
then the game is also closed. This appears to be a Windows issue since this Q&A thread doesn’t seem to have the same outcome on Linux: https://forum.godotengine.org/114077/launch-godot-game-from-another-godot-program?show=114087

I’m guessing there’s an OS-level flag that needs to be passed into the execute function (which may be seen here: process - Windows - CreateProcess detach child - Stack Overflow)

Is there a way to do this now? Or do I have to do it myself and compile Godot manually for the desired behaviour?