I have written a simple program in C# that saves to a text file every 5 seconds. I have also made a program in electron using node.js, is there a way I can start the C# program through electron?
I have tried compiling the C# program as an exe and running it that way but I couldn't get it to work.
Any help will be greatly appreciated!
Answer The problem was that my C# file needed to be run as an administrator, I used the function below;
var exec = require('child_process').execFile;
var fun =function(){
console.log("fun() start");
exec('HelloJithin.exe', function(err, data) {
console.log(err)
console.log(data.toString());
});
}
fun();