作者: | 来源:互联网 | 2023-09-04 13:44
IhavebeentryingtoexecuteanyfileinsystemandopenitinthedefaultApplicationofthesyste
I have been trying to execute any file in system and open it in the default Application of the system.
我一直在尝试在系统中执行任何文件,并在系统的默认应用程序中打开它。
For example I have abc.doc file, and i want to open it in Microsoft Word.
例如,我有abc.doc文件,我想在Microsoft Word中打开它。
This code opens the URL in default browser.
此代码在默认浏览器中打开URL。
var open = require('open');
open('http://www.google.com', function (err) {
if (err) throw err;
console.log('The user closed the browser');
});
Any suggestion how do I open system files in default application via node js.
任何建议如何通过节点js在默认应用程序中打开系统文件。
2 个解决方案