F5F Stay Refreshed Software General Software How do I run a DOS batch file?

How do I run a DOS batch file?

How do I run a DOS batch file?

S
ShrekMLG
Member
226
04-18-2026, 05:42 PM
#1
Here is a sample of my batch file below. When I do CTRL + Break, I get the message terminate batch job {Y/N}. If I select N, I want the batch file to go back to the MENU label. Is there a way this can be done? Thanks in advance. @Echo off :MENU Echo Press 0 for DISCONNECT Echo Press 1 for IPCONFIG Echo Press 2 for STATS set /p input=Enter 0-2: if %input% == 0 goto DISCONNECT if %input% == 1 goto :IPCONFIG if %input% == 2 goto :STATS echo DISCONNECT cls net use * /delete /y pause cls GOTO :MENU :IPCONFIG cls echo ipconfig /release pause ipconfig /renew pause cls GOTO :MENU :STATS cls net stats work pause cls GOTO :MENU
S
ShrekMLG
04-18-2026, 05:42 PM #1

Here is a sample of my batch file below. When I do CTRL + Break, I get the message terminate batch job {Y/N}. If I select N, I want the batch file to go back to the MENU label. Is there a way this can be done? Thanks in advance. @Echo off :MENU Echo Press 0 for DISCONNECT Echo Press 1 for IPCONFIG Echo Press 2 for STATS set /p input=Enter 0-2: if %input% == 0 goto DISCONNECT if %input% == 1 goto :IPCONFIG if %input% == 2 goto :STATS echo DISCONNECT cls net use * /delete /y pause cls GOTO :MENU :IPCONFIG cls echo ipconfig /release pause ipconfig /renew pause cls GOTO :MENU :STATS cls net stats work pause cls GOTO :MENU

C
CSGOScrub
Junior Member
43
04-19-2026, 01:03 AM
#2
It's not a good idea. Put an "Exit" choice on your menu that goes straight to the EXIT command, which ends right there after you click it. That's how it should work, but try to follow what was actually supposed to happen instead of guessing wrong.
C
CSGOScrub
04-19-2026, 01:03 AM #2

It's not a good idea. Put an "Exit" choice on your menu that goes straight to the EXIT command, which ends right there after you click it. That's how it should work, but try to follow what was actually supposed to happen instead of guessing wrong.