First post, by Annorax
- Rank
- Newbie
I've been playing around with writing a batch script to be a launcher for my games. It looks something like this:
@echo off
echo ###########
echo Choose Game
echo ###########
echo 1.) Ultima Underworld
echo 2.) Ultima Underworld 2
echo 3.) Ultima 6
echo 4.) Quit
choice /n /c:1234
if errorlevel 4 GOTO:EOF
if not errorlevel 4 if errorlevel 3 cd C:\Ultima\ultima6 & ultima6.exe
if not errorlevel 3 if errorlevel 2 C:\Ultima\uw2\uw2.exe
if not errorlevel 2 if errorlevel 1 cd C:\Ultima\uw & uw.exe
It does not work fully as intended and I think the reasons are real DOS vs DOSBox differences. Are there any workarounds or plans to implement the following?
1.) "GOTO:EOF" - this gives illegal command error but is valid in real DOS. This is helpful in batch scripts to quit the script without "exit", which closes the DOS window.
2.) Running multiple commands on one line with &, &&, |, ||, etc... does not seem to work as intended.
3.) "doskey" would be nice to have but it also gives illegal command errors.
4.) Batch files typically can have the file extension .BAT or .CMD. In DOSBox, only .BAT seems to work, not .CMD, even though the files are identical. Not a major problem as we can just use .BAT, but a difference nonetheless.
Knowledge is power. Power corrupts. Study hard. Become evil.