o close the command prompt window after a batch script is run, you can use the following command:
start /b cmd.exe /c "your_batch_script_name.bat"
The /b switch tells Windows to start the batch script in a new window and then immediately close the original window.
For example, if your batch script is called my_batch_script.bat, you would use the following command to start it and close the command prompt window:
start /b cmd.exe /c my_batch_script.bat
You can also use the following command to close the command prompt window from within your batch script:
Code:
call :close_cmd
:close_cmd
taskkill /IM cmd.exe /f
This command will call a subroutine called :close_cmd which will kill the command prompt process.
For example, you could...