我的github

方法一:

const child = require('child_process')

child.exec(`${path路径}`, (err, stdout, stderr) => {
    console.log(err, stdout, stderr)

 })

方法二:

 

参考1:https://blog.csdn.net/summer721066/article/details/107856662

参考2:https://cloud.tencent.com/developer/ask/87564

参考3:nodejs call external exe and wait for output:https://stackoverflow.com/questions/34538825/node-js-call-external-exe-and-wait-for-output

posted on 2021-09-30 15:10  XiaoNiuFeiTian  阅读(2336)  评论(0编辑  收藏  举报