Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide child process console window

When spawning a new child in nodejs on windows (child_process.spawn) it always opens a blank console window which stays open until the child process ends.

Is there a way to avoid this?

i.e. we want to run our application as a background service using forever. However, it is not very backgroundy since it keeps opening and closing blank console windows...

EDIT: Making the sub application run in "quiet" mode is not an option since parts of the processes being spawned is wmic.

like image 707
ronag Avatar asked Jul 15 '15 15:07

ronag


1 Answers

In 2017, a windowsHide option was introduced:

Hide the subprocess console window that would normally be created on Windows systems. Default: false.

like image 59
Mike Kaganski Avatar answered Sep 22 '22 05:09

Mike Kaganski