Date: Wed, 11 Feb 87 12:34:54 EST From: weiss@linc.cis.upenn.edu (Tom Weiss) Subject: Making COMMAND.COM Resident for MS-DOS 2.xx: As far as I know, there is nothing you can put in your MS-DOS 2.11 config.sys file that will make command.com stay resident. A reasonable alternative is to install command.com 'permanently' on a ramdisk. This message is a description of an easy technique to do just that. I have two floppies (A and B) and my ramdisk is C. You may need to adjust drive specs below for your system. Since I usually boot from a:command.com, I have no shell command in config.sys. The technique is quite simple. Rename your autoexec.bat file as boot.bat. Now make a new autoexec.bat file containing the following lines: copy command.com c: copy boot.bat c:autoexec.bat c:command c:\ /p If you are using a ramdisk installed by running a .com or .exe file, add your ramdisk installation command at the top of the new autoexec.bat file. No matter what kind of ramdisk you have, be sure to enlarge it to make room for command.com and boot.bat. Now reboot your system. Command.com will be installed on your ramdisk, and should reload from there under all circumstances. How it works: When your system boots, it will load command.com normally from drive A. Then the autoexec.bat file copies command.com and your boot file to drive C (the ramdisk). The next command spawns an inferior command.com, and tells it to look for itself in C:\ on reloads. The /p tells the spawned command.com to act as if it were the top-level command.com. This has two effects: 1) It makes the spawned command.com process the exit command, so that there is no way to accidentally pop it by typing exit at dos level. 2) It makes it execute autoexec.bat. Memory cost: The memory used will be the space on your ramdisk for command.com and boot.bat, plus about 4K for spawning an inferior command.com. Comments: When the spawned command.com starts, it looks for autoexec.bat in the same place you told it to look for itself on reloads (C:\ in the example above). However, drive A is still the default drive, so you should not need to make any changes to your boot.bat file. If you desire, you can place the command 'del c:autoexec.bat' at the end of boot.bat. On my system this generates a 'batch file missing' error message at the end of the boot, but causes no difficulties. Be sure NOT to delete c:command.com. You might even want to change it to read-only. Tom Weiss weiss@eniac.seas.upenn.edu (Arpanet/CSnet)