Reputation: 276313
Both of these start cmd
in the background and I can't see the cmd window:
var cp = require('child_process');
cp.spawn('cmd');
and
var cp = require('child_process');
cp.exec('cmd');
I want to get into a state where I can see this window:
Upvotes: 1
Views: 1964
Reputation: 1075587
You can use the one you're spawning to spawn another one that you can see, using the /c
or /k
option and start
:
var cp = require('child_process');
cp.spawn('cmd', ['/C', 'start cmd.exe']);
Upvotes: 5