I am using NodeJS / Electron for a desktop application.
What I want to do is open a file with its default OS application, for example .docx with Word.
What I have tried so far are approaches using child_process.spawn, .exec or .execFile, but I am not getting anything.
Here is my actual code:
var fs = require('fs'),
cp = require('child_process');
cp.spawn(__dirname + '/test.docx');
Thanks in advance.
source
share