I wrote a batch file, which has 3 .bat file running in background. I have another batch file which has 3 .bat file, which is used to stop those .bat file which ran in first batch file. All this is working fine, but after stopping those .bat files, first batch file's command window is not closing. I gave 'exit' to both the batch file which I wrote. Please help me in this.
A:
Are you using
call batchfile.bat
to run the batchfiles? If not, the flow will be unexpected.
schnaader
2009-03-13 08:03:30
i am using start /b batchfile.bat
2009-03-13 08:51:18
Even while testing with 4 simple batch files, this yields to strange errors. I think you shouldn't call batchfiles like this, it seems to confuse cmd.
schnaader
2009-03-13 09:08:04
A:
if you could convert it to .exe, with Bat-To-Exe-Converter, you could use:
tskill [program]
Like if you want to close a batch file which is converted called 'helloworld.exe':
tskill helloworld
What you also could use, is:
tskill cmd
And do this a few times. It will close 1 commdandprompt/time.
YourComputerHelpZ
2009-05-25 03:05:38
A:
You could try starting the other batch files with
CMD /C
alternatively when they are supposed to close, you could try closing them by name directly from the other batch file:
taskkill /F /IM batchname.bat
John T
2009-05-25 03:11:44