Reputation: 11
I have running casperjs program, i want during the script to wait for a few seconds and run exe file. it can be .bat as well. and then read the result from text file. as far as i know my only problem right now is to execute the external exe from the caseper program. i notice there is a solution for shell with a child process but how to do it on windows?
Upvotes: 0
Views: 111
Reputation: 11
Find it! Maybe it will help someone...
var exec = require('child_process').execFile;
var test = function(){
console.log("test is running");
exec('huh.exe', function(err, ans)
{
console.log(err)
console.log(ans.toString());
});
}
test();
Upvotes: 1