Yes its a windows application. | [reply] |
its a windows application.
I suspect that that the window you are seeing is being created when the C++ app spawns Perl; rather than when Perl calls system; and unless you have access to the sources of the C++ and can modify it; you may be stuck.
The only suggestion I have that might fix it without modifying the C++ app is to swap your call to system, for a call to Win32::Process, and try using the CREATE_NO_WINDOW flag.
If that doesn't work, see above.
| [reply] |
I agree; likely it is the launch from C++which is creating the window, and thus would not expect the fix to be in the Perlportion of the code.
I did find this -- if not directly applicable, it may be a cluebat towards a solution. Stringing several of the answers together seems to yield a workable solution:
Use CreateProcess
| [reply] [d/l] [select] |
Though I have not tried Win32::Process as I have some limitation to add new module in my application. But as you suspected the application is not creating the window as I am able to see the command that I gave in system in perl getting executed in command prompt window. I am able to rectify this in Linux by adding a extra argument $args5 = " 2>&1 >/dev/null"; which is passing the output to /dev/null and do not show on prompt. Similar way I want it in Windows so that it do not show command prompt and complete the command execution in background.
| [reply] |