Search code examples
batch-filecmdwindowwindows-xptaskkill

Closing multiple windows with CMD


I have been working on a batch-file program that opens multiple windows and then closes them all at the same time. I can use the TASKKILL command on Windows 10 to close them all simultaneously. I also want to use the program on Windows XP Home SP3 but it doesn't have the TASKKILL command. So my overall question is: Is there any way to close multiple windows on Windows XP through the Command Prompt without any 3rd party software? Also, here is the batch code I am using:

@echo off
:init
cls
color 0f
title Test A1
start %RandomProgram%
ping localhost -n 10 >nul
start %RandomProgram%
ping localhost -n 10 >nul
start %RandomProgram%
ping localhost -n 10 >nul
start %RandomProgram%
ping localhost -n 10 >nul
start %RandomProgram%
ping localhost -n 15 >nul
::Close all the above windows here::

Solution

  • Squashman was right,

    Windows XP has TSKILL