Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 如何使用Nodejs Child_进程从一个Exe到另一个Exe获取数据_Node.js_Node Webkit - Fatal编程技术网

Node.js 如何使用Nodejs Child_进程从一个Exe到另一个Exe获取数据

Node.js 如何使用Nodejs Child_进程从一个Exe到另一个Exe获取数据,node.js,node-webkit,Node.js,Node Webkit,我有两个使用节点webkit创建的exe文件(Intro.exe和Main.exe)。我在Intro.exe中有一个变量(sendData)。我想将sendData变量从Intro.exe发送到Main.exe。我在Intro.exe中使用了以下代码来执行Main.exe var sendData = "sending Data"; var path = require("path"); var sPath = path.dirname(process.execPath)

我有两个使用节点webkit创建的exe文件(Intro.exe和Main.exe)。我在Intro.exe中有一个变量(sendData)。我想将sendData变量从Intro.exe发送到Main.exe。我在Intro.exe中使用了以下代码来执行Main.exe

    var sendData = "sending Data";
    var path = require("path");
    var sPath = path.dirname(process.execPath);

    var exec = require('child_process').execFile, childWin;
    childWin = exec(Main.exe,[sendData], {cwd:sPath}, function(err, data) {
             Console.log(data);
    });
现在,我想在Main.exe中获取sendData。 我想在Main.exe中使用什么代码来获取数据。提前谢谢