I have a c# app (app.exe), which I want to run from a command line window and then to CLOSE the command line window after the app started.
I tried to search for "cmd" in the processes list and to close it (cmdProcess.CloseMainWindow()) but in this case, if I run app.exe by double-click only, and there is another cmd opened separately, it will be closed- and I don't want that. How can I know which cmd instance runs my app?
thanks