|
Answer» @echo off echo 1 - defrag echo 2 - calc echo 3 - notepad echo 4 - exit
set /p chice=
if %CHOICE% equ 1 GOTO defrag if %choice% equ 2 goto calc if %choice% equ 3 goto note if %choice% equ 4 goto exit
:defrag call %SystemRoot%\system32\dfrg.msc
:calc call %SystemRoot%\system32\calc.exe
:note call %SystemRoot%\system32\notepad.exe
:exit exit
:question set /p c=do you want to exit[y/n]? if /i "%c%" "y" goto end if /i "%c%" "N" goto clr :end exit
:clr cls echo if you want to exit type EXIT. a made a mistake but when i press 1 it opens it up and when i exit it goes to the next program and exitsCode: [Select]@echo off :MENU cls echo 1 - defrag echo 2 - calc echo 3 - notepad echo 4 - exit
set /p choice=
if %choice% equ 1 goto defrag if %choice% equ 2 goto calc if %choice% equ 3 goto note if %choice% equ 4 goto exit
:defrag call %SystemRoot%\system32\dfrg.msc goto MENU
:calc call %SystemRoot%\system32\calc.exe goto MENU
:note call %SystemRoot%\system32\notepad.exe goto MENU
:QUESTION cls set /p c=do you want to exit[y/n]?: if /i "%c%" "y" exit /b if /i "%c%" "n" goto MENU goto :QUESTION
:exit call :question exit
|