0

I need to execute command line commands from an ElectronJS App which also has NodeJS available and then capture the response from those commands ran.

The Xampp Windows WAMP Dev Server app shown below has an example of capturing the command response and showing it in an app.

How can I do this in a NodeJS/ElectronJS app?

1 Answer 1

1

You can use the module Child Proccess using the method exec. The documantation for it is pretty clear and can be seen in this link: https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback

The command line response will be in the stdout parameter of the callback function.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.