Search code examples
batch-filecmd

How to automatically close cmd window after when i choose the option?


@echo off
cls
:start
echo.
echo 1. Multiplayer
echo 2. Singeplayer
echo.
echo.
set /p x=Pick:
IF '%x%' == '%x%' GOTO Item_%x%

:Item_1
start /MIN /D"D:\games\Battlefield 2142 - Deluxe Edition\mods\bf2142\Tools\BF2142Unlocker64" BF2142Unlocker.exe
GOTO Start

:Item_2
start /MIN /D"D:\games\Battlefield 2142 - Deluxe Edition" BF2142_offline_4gb.exe
GOTO Start

i'm trying to solve it but i am noob shortcuts take up a lot of space on the desktop so I'm trying to run it with bat file


Solution

  • Change it to

    start /MIN /D"D:\games\Battlefield 2142 - Deluxe Edition" BF2142_offline_4gb.exe
    exit