I am trying to execute the windows command through cmd.exe in node.js using child_process.spawn. It runs correctly, but displays only the default text color. How to keep color. Is it possible?
var spawn = require('child_process').spawn, cmd = spawn('cmd', ['/s', '/c', 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\MSBuild c:\\test.sln']); cmd.stdout.on('data', function(data){ process.stdout.write(data); }); cmd.stderr.on('data', function(data){ process.stderr.write(data); }); cmd.on('exit', function(code){ console.log(code); });
When executed through node, the color is not saved. 
When executed directly through cmd.exe, color is present. (This is the expected behavior). How do I get this behavior when executed through node. 
prabir Oct 11 '11 at 12:08 2011-10-11 12:08
source share