Étape 2: Configuration du menu
Si vous copiez le code ci-dessous veillez à ne pas copier mon explication avec lui. Seulement quand il est nouveau, je mettrai l’explication dans le code.
::The @ disables echo for that one command. OFF
::Clear the screen/window CLS
::Executes the code from here. This is also called a "label" :MENU ::Empty rule echo. ::Display text on screen echo ----------------------------------- echo Windows Tool echo ----------------------------------- echo 1. Generate Backup of Files (enter 7 to see information) echo 2. Check Network Connectivity echo 3. Close Not Needed Windows Services (enter 6 to see services) echo 4. Deletes Temporary Internet Files, History and Cookies echo 5. Show Computer Information echo ----------------------------------- echo Help echo Exit echo.
::Sets M to the given input from the user SET /P M=Choose and then press ENTER:
:: Note - list ERRORLEVELS in Decreasing order ::Checks if M is equal to the variables given belowIF %M%==exit GOTO End IF %M%==help GOTO Help if %M%==about GOTO About IF %M%==7 GOTO BackupInfo IF %M%==6 GOTO ShowServices IF %M%==5 GOTO GetComputerInfo IF %M%==4 GOTO DeleteCache IF %M%==3 GOTO CloseSomeServices IF %M%==2 GOTO CheckNetworkConn IF %M%==1 GOTO CreateBackup