bk_lounge
bk_lounge

Reputation: 543

Run an installer inside my program

How can I run an installer of an independent program (exe file) from inside of my code? The idea in general is program which install other programs. Thanks! Barak

Upvotes: 1

Views: 46

Answers (1)

einsh10
einsh10

Reputation: 314

use exec of node.js

const { exec } = require('child_process');
exec('path/to/exe', (error, stdout, stderr) => {
  if (error) {
    console.error(`exec error: ${error}`);
    return;
  }
  console.log(`stdout: ${stdout}`);
  console.log(`stderr: ${stderr}`);
});

Upvotes: 1

Related Questions