Windows – Start Windows application from batch file without leftover command window

batchwindows

I have a simple batch file that sets some necessary per-session path information and then launches an application:

SET PATH=%PATH%;C:\Qt\473_x64\lib;C:\Qt\jom
start C:\Qt\qt_creator_220_x64\bin\qtcreator.exe

It is working fine except that it keeps open a ghost command window. This command windows shuts down when the application shuts down. To be clear, the command window that comes up when I initially double-click the batch file closes. It is a new window that opens up. How do I prevent this second window from displaying? I would like to just double-click on a short cut to the batch file and it open the application as if I had double-clicked on the application itself. (Plus, of course, setting the necessary path information.)

Best Answer

I'm curious what your application does. Because this has nothing to do with the batchfile. The batch file only opens one window and clearly closes. Any subsequent windows are caused by QTcreator.

Look at this question and see if the edits are similar to yours.

https://stackoverflow.com/questions/760323/why-does-my-qt4-5-app-open-a-console-window-under-windows

Related Question