I put this below code inside my *.dll for Internet Explorer.
FILE *child = _popen("java -jar c:\\simmetrics.jar c:\\chtml.txt c:\\thtml.txt > c:\\output.txt", "r");
fclose(child);
My problem is, when I run my Internet Explorer, the will be a cmd.exe console open too. I don’t want the console to suddenly appear when I run my browser. How can I avoid this or hide it or not to execute it at all)?
update:
How to properly call javaw from the code? It still popping up the console windows 🙁
FILE *child = _popen("javaw -jar c:\\simmetrics.jar c:\\chtml.txt c:\\thtml.txt > c:\\output.txt", "r");
update:
Is there any other way? The console window still being called everytime I run this line of code inside my program.
You can use
CreateProcessinstead of_popen. It’s a bit more cumbersome, but you can pass theCREATE_NO_WINDOWflag as part of thedwCreationFlagsparameter to prevent the console window from appearing.If you need to capture the output of the process you’ve created, you can use
CreatePipe/ReadFileto do so. MSDN has a thorough example of doing this here.