You could disable the command window with the linker option /SUBSYSTEM:WINDOWS
Then, as far as I know, a command window will jump out whenever I run some external command such as python that needs stdin/out. Joost's lyx.exe/lyxc.exe solution is good enough. BO