Message-Id: <199805141530.LAA00034@mailhost.ccboe.net> Date: Thu, 14 May 1998 09:19:35 -0700 To: djgpp AT delorie DOT com From: Greg Phillips Subject: Re: Looking for help with MSDOS AUTOEXEC & CONFIG In-Reply-To: <355ac9a8.0@scooby.nildram.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Precedence: bulk >1) What are the differences between "genuine" MSDOS, Win95's DOS in a window >(via Start menu) and rebooting Win95 into MSDOS mode? Genuine MS-DOS would be anything up to DOS 6.22. Win95 DOS in a window is running command.com (DOS command interpreter) in a Win95 window. This includes long filename support and uses the drivers from Win95. Rebooting to MS-DOS mode causes command.com to be loaded, but not Win95. From here, there is no long filename support, and the files config.dos and autoexec.dos (if present) are used in place of their config.sys and autoexec.bat counterparts. Normally, when you boot a Win95 machine, command.com is loaded, then the Win95 shell. A DOS window inside Win95 is command.com running inside win.com running on top of the first command.com. Complex, ain't it? :) >2) Do books on the newer MSDOSs apply to DOS under W95 in general? For the most part. Almost all the commands are still there, updated for Win95 so that they can handle long filenames. >3) AUTOEXEC.BAT is a file that simply executes the list of commands >contained within on booting, or running the DOS window- right (or wrong)? >And assuming I haven't configured a special DOS shortcut with its own >AUTOEXEC, does it run for all DOS Windows when launched? >And I'm guessing CONFIG.SYS tells the system where to find any device >drivers... config.sys and autoexec.bat are only loaded the first time command.com is loaded. They are not reloaded for a DOS window. >4) Does SET PATH tell DOS where to search for a certain command, say gcc, >and if so, how do I get DOS to look in two different paths for a program >(since it seems I can't do two SET PATHs)? >I've got this line in my AUTOEXEC.BAT file... > set PATH=C:\NUPROGS\DJGPP\BIN\GNU\EMACS\BIN;%PATH% >but I'd like to have emacs on the path > C:\NUPROGS\djgpp\gnu\emacs >running. Search paths in the path statement are seperated by semi-colons. So the path that you see in your autoexec.bat file says that if it doesn't find the requested program in the current path, to look in 'c:\nuprogs\djgpp\bin\gnu\emacs\bin' for programs. If it doesn't find them there, look in %path%. Well, in DOS, %path% is evaluated as your current path. This is how you can add new paths to the current path without having to retype the whole thing. Windows 95 automatically sets the path to 'c:\windows;c:\windows\command'. So, the %path% variable you see simply adds the current path to the end of the path you have listed there, instead of replacing it. So, if you want to add the 'C:\nuprogs\djgpp\gnu\emacs' path to the path you see listed, you have two options: 1. Edit the line so that it reads like this: set PATH=C:\NUPROGS\DJGPP\BIN\GNU\EMACS\BIN;C:\NUPROGS\DJGPP\BIN\GNU\EMACS;%PATH% 2. Add the following line below the path line you see: set path=C:\NUPROGS\DJGPP\BIN\GNU\EMACS\;%path% Remember, DOS searches in the order you have the paths listed. So, if you have a copy of emacs in the 'C:\NUPROGS\DJGPP\BIN\GNU\EMACS' directory and a newer one exists in 'C:\NUPROGS\DJGPP\BIN\GNU\EMACS\BIN', DOS will run the one in the 'C:\NUPROGS\DJGPP\BIN\GNU\EMACS' directory (unless you are currently in the 'C:\NUPROGS\DJGPP\BIN\GNU\EMACS\BIN' directory, thereby causing DOS to find the requested program in the current directory and never forcing it to search the path) since it is listed first in the path. Also note: DOS only uses the path for programs. It will not search the path for data files. Some programs can do this if they choose, but that is something that has to be programmed into the programs. Hope this helps! Greg