Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
One batch file uses start command to open another.
Just like the description in "start /?" sais:
If it is an internal command or a batch file then
the command processor is run with /K switch to cmd.exe.
This means that window will remain after the command
has been run.Adding the exit command at the end of batch file
will close the window.The thing is I need that second batch to delete itself,
and then exit.del %0 exitBut, of course, after file deletes itself exit command
won't be run and window will remain open.I had in mind using call to open the second batch,
and then using taskkill to close the first one.
This way the second batch would close automatically
after it deletes itself.But both batches are cmd.exe processes and
therefore I can't specify which one to kill.Does anyone has an idea how to do this?

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |