pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Console window

Open Admiral-Enigma opened this issue 8 years ago • 5 comments

How do I prevent a console window opening when I run my exe?

Admiral-Enigma avatar Dec 13 '17 18:12 Admiral-Enigma

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

claytonaalves avatar Dec 29 '17 11:12 claytonaalves

Having the node application, what options can I set so the console windows does not show?

BernardoLaing avatar Dec 14 '18 01:12 BernardoLaing

@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)

staafl avatar Nov 22 '19 14:11 staafl

duplicate of #135

hipstersmoothie avatar Mar 23 '21 17:03 hipstersmoothie

@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)

It works perfectly for me, thank you dude!

mcuong223 avatar May 15 '23 06:05 mcuong223