• Please review our updated Terms and Rules here

How to have autoexec/config sys menus on on Caldera OPENDOS 7/DRDOS

soviet9922

Veteran Member
Joined
Jun 12, 2013
Messages
555
Location
Montevideo, Uruguay
Hi, currently quite familiar on how to do option menus on msdos but for some reason i can't get it to work on opendos.
The syntax for the menus is different than on msdos.

Got this example from here https://nscsysop.hypermart.net/multiboot.html

Do this on my config sys example:
echo=1. Server
echo=2. DR-DOS
echo=3. XCopy all files on C: to D:
switch server, drdos, xcpy
exit

:server
set config=server
Files=60
Buffers=60
return

:drdos
set config=drdos
Files=60
Buffers=60
Device=c:\OAKCDROMDRV.SYS /D:CD001
return

:xcpy
set config=xcpy
Files=60
Buffers=60
return


Then on autoexec.bat
IF "%config%"=="server" goto NOVELL
IF "%config%"=="dos" goto DOS
IF "%config%"=="xcpy" goto XCPY

:DOS
nwcdex.exe /d:CD001
goto DONE

:XCPY
cls
@echo Copying all files on C: to D:
xcopy c:\*.* d: /h /r /f /v /e /s
goto DONE

:NOVELL
cd c:\nwserver
server -nl

:DONE

When i reboot the menu options show fine i can choose using the keys 1 2 3.
Then the selection part from config.sys will work the menu will jump to the correct :tag in config.sys and then go to autoexec.bat
But then on autoexec.bat it will parse the complete file ignoring my "goto DONE" statments and the "IF" section will run every command in the file from top to bottom.

Its hard to find good references for drdos most about menus on the web are about msdos.

Someone have experience doing menus on drdos ?, or know a better wat to get menus on DOS in place of the build in commands ?
 
Try removing the "s around the %config% variables. I'm thinking they (the quotes) are forcing them to be treated as a string instead of a variable. Leave the "s around the words to the right of the == since these are strings.
 
Another potential issue is that all of your labels are upper case. The examples I found in the DR-DOS 6 User Guide show labels in batch files in lower case only. However, the manual does not specify if they MUST be lower case. Try changing the labels to lower case. Don't forget to change them in the GOTO statements as well. Also, the GOTO statements are upper case in the guide examples. Click on the tiny picture below to see an example from the manual.

example.png
 
Don't know what the differences are between DRDOS 7 and my DRDOS 6, but the section on configuration files and statements is pretty extensive in the 660-odd page user manual (when products were packed with real manuals and not just empty boxes with a CD inside).

I'm guessing that you're confusing the batch file command syntax with the configuration command syntax. I believe that they're different.
 
Another potential issue is that all of your labels are upper case. The examples I found in the DR-DOS 6 User Guide show labels in batch files in lower case only. However, the manual does not specify if they MUST be lower case. Try changing the labels to lower case. Don't forget to change them in the GOTO statements as well. Also, the GOTO statements are upper case in the guide examples. Click on the tiny picture below to see an example from the manual.

View attachment 58509

Thanks for the info tested this removing "" and also using lowercase but the IF statments on the autoexec file are completly ignored.
 
code what ?

Click on the Advanced button which gives a larger toolbar. The "#" button will surround the text in a Code block. Basically the same as a quote block but designed for code.
For example,

Code:
Then on autoexec.bat
 IF "%config%"=="server" goto NOVELL
 IF "%config%"=="dos" goto DOS
 IF "%config%"=="xcpy" goto XCPY
 
I have checked the documentation and using the help command and is correct, the switch command and :LABEL work perfectly like the documentation shows. Can choose and option fine and will only run the label in config.sys perfectly.

The issue is in autoexec.bat i don't see how to jump to a :LABEL from config.sys to another label on autoexec.bat there's nothing about that on the documentation.

Search on the web and only found that adding to autoexec.bat "IF "%config%"=="menu option config sys" then goto LABEL" when the autoexec.bat is reach it should jump to the correct LABEL that corresponds to the option choose in config.sys, but no mather how i try this don't work.
Tested adding an echo %config% at the start of autoexec.bat but this variable seems to be empty so i suposse that is why the menu don't work.
Start to think that is not possible to have dual menu for config.sys and autoexec.bat on dr.dos
 
Use CONFIG.SYS SET command to set environment variables according your preferences, then use IF %environment-variable% - type statements to make your decisions in AUTOEXEC.BAT.

Easy.
 
thanks chuck, setting an environment variable on config.sys when you pick an option and then using it on the if statements on autoexec does the trick quite easy like you say.
 
thanks chuck, setting an environment variable on config.sys when you pick an option and then using it on the if statements on autoexec does the trick quite easy like you say.

Can you list your latest config.sys and autoexec.bat files. I'm still not clear on what made the difference. Just curious.
 
Back
Top