I'm not sure that it started to work, as on previous versions of Windows, however, in Windows 10 it does not work, as indicated in the answer. The first argument is the name of the window.
In addition, the behavior between windows and linux is different. Windows "start" will execute and exit, under Linux, xdg-open will wait.
It was a feature that ended up working for me on both platforms in a similar way:
function getCommandLine() { switch(process.platform) { case 'darwin' : return 'open'; default: return 'xdg-open'; } } function openFileWithDefaultApp(file) { /^win/.test(process.platform) ? require("child_process").exec('start "" "' + file + '"') : require("child_process").spawn(getCommandLine(), [file], {detached: true, stdio: 'ignore'}).unref(); }
Ralph
source share