I have a program run a batch file and want to know how to close out the command console once the batch has been run. Right now I'm using a CreateProcess to do the whole thing.
I have a program run a batch file and want to know how to close out the command console once the batch has been run. Right now I'm using a CreateProcess to do the whole thing.
Um...
If you mean the actual dos window, then the dos command "cls" at the end of your batch script will close the console window when the bat file ends. Write your bat file like so
Make sure you dont press enter after clsCode:REM My Bat File Dos Command1 Dos Command2 cls
heheh this is further proof that sometimes the easiest answer is the simplest. I never even thought of closing the batch from the batch itself. Thanks for your common sense Fordy.