Tuesday, October 19, 2010

Duke Nukem Batch menu using SET command

Duke Nukem game 1 (1991) and 2 (1993) registered version  Batch (.bat) menu using DosBox.

CHOICE is not standard in  Windows XP although it as put back in Vista.  As a work around, you can make a menu using the SET command.  The previous post has the menu using CHOICE.  This is the SET version.

This creates two temporary files stdout.txt and stderr.txt in the directory where the .bat menu is located.  They are removed by this .bat file when closing.

of course this depends on standard installations.  If your installation paths are different, you will need to change the menu appropriately.

copy and paste the following and save it as a batch (.bat) file.  Edit it as needed for your own use.

=======================================================

@echo off

 title Duke Nukem
color 17
:LOOP
cls

echo.
echo.
echo.
echo.
echo            ============================================
echo                         Duke Nukem Main Menu                                            
echo            ============================================
echo.
echo                1.  Duke Nukem 1, Episode 1
echo                2.  Duke Nukem 1, Episode 2
echo                3.  Duke Nukem 1, Episode 3
echo.
echo                4.  Duke Nukem 2 (Episodes 1-4)
echo.
echo                5.  Exit
echo.
echo.
echo.

set INPUT=
set /p INPUT=Enter choice : 

if "%input%"=="5"  goto exit
if "%input%"=="4"  goto nukem2
if "%input%"=="3"  goto dn3
if "%input%"=="2"  goto dn2
if "%input%"=="1"  goto dn1

goto :LOOP

:dn1
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn1
goto :exit

:dn2
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn2
goto :exit

:dn3
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke1"    -c k:  -c  dn3
goto :exit

:nukem2
cls
"C:\Program Files\DOSBox-0.73\dosbox.exe"  -conf dosbox.conf  -noconsole    -c "mount k:  c:\duke2"    -c k:  -c  nukem2
goto :exit

:exit
del stderr.txt
del stdout.txt
exit


.

No comments:

Post a Comment