1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-19 01:33:18 +00:00

Improved agent that can update the MeshCentral1 agent

This commit is contained in:
Ylian Saint-Hilaire
2017-11-09 16:07:39 -08:00
parent 34e09c2304
commit becf71557f
36 changed files with 1520 additions and 208 deletions

27
Debug/ChildProcessTest.js Normal file
View File

@@ -0,0 +1,27 @@
var child = require('child_process');
var childProcess = null;
if (process.platform == 'win32')
{
childProcess = child.execFile(process.env['windir'] + '\\system32\\cmd.exe', ['/c', 'dir'], OnChild);
}
else if (process.platform == 'linux')
{
childProcess = child.execFile('/bin/sh', ['sh', '-c', 'ls'], OnChild);
}
if (childProcess != null)
{
console.log('PID = ' + childProcess.pid);
childProcess.stdout.on('data', function (chunk) { console.log(chunk.toString()); });
childProcess.on('exit', function (code, sig) { console.log("Process Exited with code: " + code.toString()); });
}
//for (var envkey in process.env)
//{
// console.log("Environment Variable: [" + envkey + "] = " + process.env[envkey]);
//}
function OnChild(err, stdErr, stdOut)
{
}