vendredi 4 août 2017

How to terminate an app after pressing any key and it will return to the Menu?

How do I create a batch file that allows the user to select an app to be run then it will prompt "Press any key to continue", after pressing any key the selected appl will be terminated and will return to the Menu?

@echo off
title MENU
:menu
cls
echo.
echo SELECT APPLICATION YOU WANT TO RUN:
echo ===================================
echo.
echo 1. Google Chrome
echo 2. APP 2
echo 3. EXIT
echo.
echo ===================================
echo.

set /p web= Enter Number of Choice:

if "%web%"=="1" start chrome.exe (pause)
if "%web%=='2' start app2.exe (pause)
if "%web%"=='3' exit

goto menu

pause

Aucun commentaire:

Enregistrer un commentaire