“Child_Process” function Exec hanging on Windows

Before I get bashed for using Guilded over Discord, that isn’t the point of this question. Also, yes this is a Client Mod for Guilded, for which we have been given permission by Guilded to program.

The issue is closing the software, before messing with the files and the opening once we’ve finished the process. Two issues come from both exec commands, I’ve tried solutions I found on other questions, but none were successful, I also tried awaiting SpawnSync, with a callback, no dice.

// Close Guilded, then continue, because we need to make sure Guilded is closed for the new injection.
exec(platform.close).on("exit", () => {
    // Creates path for ReGuilded
    const reguildedPath = resolve(dir || join(process.env.APPDATA || process.env.HOME, ".reguilded"));

    tasks[taskArg](platform, reguildedPath, elevator)
        .then(() => {
            console.info(
                "Relaunching Guilded (If not opened in 10 minutes after this please manually execute the app)"
            );

            // Open the app Again after the injection task is done
            exec(platform.open).on("exit", () => {
                process.exit();
            });
        })
        .catch(err => {
            console.error("Failed to do task", taskArg, ":", err);
        });
});
// platform.close
// Linux: "killall guilded"
// Darwin: "killall Guilded"
// Win32: "taskkill /f /IM Guilded.exe >nul"

// platform.open
// Linux: "/opt/Guilded/guilded& disown"
// Darwin: "/Applications/Guilded.app"
// Win32: join(process.env.LOCALAPPDATA, "Programs/Guilded/Guilded.exe") + " >nul"

All these commands do launch & close Guilded successfully, but the issue lies in the shell, not closing/returning primarily on Windows.

The code is TS at source but gets compiled into JS. Any help or pointers would be helpful. We’re using the latest LTS of Node, and are looking for 100% cross-compatibility.