How do I prevent a console window opening when I run my exe?
Nodejs always opens a console window. This behavior is related to the target image and you can't change it unless you recompile the target image with this option disabled.
Nonetheless, this link has some nice insights to workaround this: http://www.robvanderwoude.com/battech_hideconsole.php
Having the node application, what options can I set so the console windows does not show?
@BernardoLaing , on Windows, you can set a flag on the exe to ensure it runs without a console window:
editbin /subsystem:windows myprogram.exe
editbin on my machine is located at c:\program files (x86)\microsoft visual studio\2019\Preview\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x86\editbin.exe (I'm using VS 2019)
Note running the edited app in through a console will not produce output unless you explicitly pipe it (e.g. myprogram.exe | type)
Most helpful comment
@BernardoLaing , on Windows, you can set a flag on the exe to ensure it runs without a console window:
editbin /subsystem:windows myprogram.exeeditbin on my machine is located at c:\program files (x86)\microsoft visual studio\2019\Preview\VC\Tools\MSVC\14.20.27508\bin\Hostx86\x86\editbin.exe (I'm using VS 2019)
Note running the edited app in through a console will not produce output unless you explicitly pipe it (e.g. myprogram.exe | type)