2

Am using bellow code to pass two arguments along with an exe file execution as follows.But it is not working.in command line it is working properly.

var osName =jobData[0].os;
exec('Shedule.exe',['value=Start'],['ID=osName'], function (err, data) {                
                console.log(data);                  
               });


in cmd
C:\Users\Desktop\ver>Shedule.exe value=Start ID=WIN7-64
3
  • Did you try exec('Shedule.exe value=Start ID=osName', function (err, stdout, stderr) { ? and where is this node app running at? Commented Nov 15, 2013 at 5:00
  • exec('Shedule.exe value=Start ID=osName', function (err, data) { i tried this way but it is not working Commented Nov 15, 2013 at 5:01
  • It could be a path issue as well to the file. What err you get? Commented Nov 15, 2013 at 5:02

1 Answer 1

1

Try this.I think this will solve your problem.

 var osName =jobData[0].os;
    exec('Shedule.exe',['value=Start','ID='+osName], function (err, data) {                
                    console.log(data);                  
                   });
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you it is getting now:-)

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.