Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Ctrl + Break return to :Menu Label  (Read 20830 times)

0 Members and 1 Guest are viewing this topic.

falcios

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Windows 10
    Ctrl + Break return to :Menu Label
    « on: June 09, 2021, 10:16:29 AM »
    Here is a sample of my batch file.

    After running :IPCONFIG, at any point can I do a a Ctrl + Break and return to the :MENU label instead of the window closing?

    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