|You mean command prompt window as there is no DOS in windows XP. DOS is an operating system in its own right, not just a command prompt.|
The usual way to close a command window is to type exit. If you are getting a cancel option it means there is still something running in the command window. By forcing a closure you are terminating whatever it is. If there is nothing running the windows will close without asking for confirmation.
Have a rethink as to what opened the command window in the first place.