简体   繁体   中英

How to create button to run exe file use node.js

im trying to make a desktop gui used node.js to execute my program ,i want to know if there have anyway to create a click button to execute pe(exe) file use node.js and html? (my english not really good hope you can understand :)

Take a look at the following sample code :

 const { exec } = require('child_process'); exec('cat *.js missing_file | wc -l', (error, stdout, stderr) => { if (error) { console.error(`exec error: ${error}`); return; } console.log(`stdout: ${stdout}`); console.log(`stderr: ${stderr}`); });

And read here carefully : https://nodejs.org/docs/latest/api/child_process.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM