Jump to content
LaunchBox Community Forums

Passing ERRORLEVEL from CHOICE to a variable?


Recommended Posts

I'm attempting to use the CHOICE command in DOSBox to set a one-time option by passing the value of ERRORLEVEL to a text file where it can be read later. Sadly, I don't think it's possible with DOSBox's limited capabilities but I figured I'd post the problem in case anyone has a solution.


echo Press 1 for Space Quest V: The Next Mutation w/ SoundBlaster

echo Press 2 for Space Quest V: The Next Mutation w/ MT32

echo Press 3 for Space Quest V: The Next Mutation w/ Sound Canvas


choice /C:1234 /N Please Choose:

if errorlevel = 3 goto SC55

if errorlevel = 2 goto MT32

if errorlevel = 1 goto SB16


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...