Jump to content
xisto Community
Sign in to follow this  
taplinb

Dos 6.22 Trick With Ramdrive Make a legacy app not need a hard drive

Recommended Posts

This is partly fun, partly to record how I got around an annoying restriction with a particular piece of software we use to control door locks. This software must run on DOS 6.22, not Windows 98 command line, not in a DOS window, but native DOS. Very particular.

I had been installing DOS 6.22 onto a spare laptop, loading the software and then our data, running the program, backing up the data, wiping the laptop's drive, and restoring our standard Win2K setup via ghost. That worked, but it killed a couple of hours every time I had to run that program, and I wasn't inclined to just dedicate a laptop to this one thing. It should be a laptop because it must run in close proximity to the door lock being reprogrammed.

So here's what I did instead:

1. Installed the software as described, made
sure it works and has a current data set.

2. Loaded DOS drivers for the CDROM and
a RAM drive. Then the program failed to load.

3. Ran DOS 6.22 memmaker to optimize the
memory a bit. This took a couple of tries.

4. Cleaned up autoexec.bat and config.sys
so the memmaker settings would mostly
be retained but not address-specific refs,
since addressing might change as I...

5. Added some conditional branching to
config.sys and autoexec.bat (see below),
and made copies (replacing C: with A:)

6. Created a DOS 6.22 bootable floppy and
copied these tweaked autoexec.bat and
config.sys files plus critical DOS stuff and
the CDROM driver to the floppy, and then
tested to see that the drivers would load.

7. When satisfied that the floppy worked as
needed and left enough memory to run
the DOS program, copied its contents to
a backup on the network along with all
the lock program's data to another dir.

Copying the program took some doing
because DOS didn't include network
stuff. I actually ended up using DOS
interlnk/intersvr to copy to another box
with a FAT16 partition (boot from floppy)
and then using Windows to copy from
that FAT16 partition out to the network.

8. From that network backup, copied the
program (with included baseline data)
to a local drive on a PC with CD writer.

9. Used my custom DOS 6.22 boot floppy
with Nero 6 to start building a bootable
CDROM. This CD boots as a virtual A:
drive, sees the real A: as B:, and with
the DOS drivers loads its own CD and
RAM drives as C: and D: (when asked).

10. Burned all the program's data plus
a batch file to automate some steps
onto the non-floppy-emulating part
of the CD (the majority of the CD).

Remember that the goal here was to not have to rebuild the dang laptops. This way I can load DOS 6.22 and a baseline of the program plus data from CD, copy the program into the writeable RAM drive, load updated data from B: (the real floppy) to the RAM drive, run the program, save changes back to B:, remove the CDROM, and be done.

The laptop's hard drive never gets touched, and this makes any standard PC or laptop instantly available as a fallback. As long as the data backup is preserved along with the bootable CD (or image thereof), this should work until the death of standard x86 PCs.

It was a trip down memory lane, having left DOS behind (I thought) half a decade ago. Here are the floppy's boot files. The actual CDROM driver is not CDROM.SYS. Use whatever DOS CD driver works for you:

device=a:\DOS\himem.sysdevice=a:\DOS\EMM386.EXE NOEMS
buffers=7,0
files=30
dos=umb
lastdrive=Z
fcbs=4,0
dos=high

[menu]
menuitem=NONE, Load neither of these drivers...
menuitem=RAMDRIVE, Load only the RAMDRIVE driver
menuitem=CDONLY, Load only the CDROM driver
menuitem=ALL, Load RAMDRIVE and CDROM drivers
menudefault=ALL,5

[ALL]
devicehigh=a:\DOS\RAMDRIVE.SYS 8192 512 /E
devicehigh=a:\DOS\CDROM.SYS /D:CD
[RAMDRIVE]
devicehigh=a:\DOS\RAMDRIVE.SYS 8192 512 /E
[CDONLY]
devicehigh=a:\DOS\CDROM.SYS /d:cd
[NONE]


@echo offchoice Load Smartdrive (default is no in 5 seconds) /tn,5
if errorlevel 2 goto prompter
cls
smartdrv.exe /x
smartdrv.exe
:prompter
prompt $p$g
path a:\DOS
echo.
goto %config%
:NONE
:RAMDRIVE
goto yabadaba
:CDONLY
:ALL
lh mscdex /d:cd
:yabadaba
echo.
if not exist d:\yabadaba.bat goto end
echo.
echo Next I'll call batch file d:\yabadaba.bat, which should
echo include DOS or data tweaks specific to using whatever
echo software was copied onto the larger portion of this CD.
echo.
echo To prevent calling d:\yabadaba.bat, break now. If you
echo have questions about this CDROM, just ask its creator.
echo.
pause
call d:\yabadaba.bat
:end


Notice from snlildude87:
Brad, even if you wrote this on another site (maybe yours), you still have to quote it. It's the rules. Please do this next time, or I will have to reduce your credits.

Thanks.

(If your name is not Brad, then ignore the first word)

Edited by snlildude87 (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.