[comp.sys.ibm.pc.programmer] How to comment out lines in config.sys ?

heath@ncrcae.Columbia.NCR.COM (Robert Heath) (03/08/90)

How do you comment out lines in config.sys without getting warning messages
from DOS as it attempts to read them ?

	Robert Heath

stever@Octopus.COM (Steve Resnick ) (03/09/90)

In article <5793@ncrcae.Columbia.NCR.COM> heath@ncrcae.Columbia.NCR.COM (Robert Heath) writes:
>How do you comment out lines in config.sys without getting warning messages
>from DOS as it attempts to read them ?
>
>	Robert Heath

There is no way to cleanly do this as far as I know, but you can place colons
(:) infront of unwanted commands in config.sys if you don't mind the
"Unrecognized command in CONFIG.SYS" messages....
 
 Hope this helps.... Steve

jsulliva@cvbnet.UUCP (Jeff Sullivan, x4096 MS 4-2) (03/10/90)

  In MS-DOS 4.01, you are able to use "REM", just like
  in batch files. This is a very useful feature, but I
  am not sure if it's applicable to older versions of
  DOS. Can anyone confirm this for earlier versions?

  -Jeff

dmt@pegasus.ATT.COM (Dave Tutelman) (03/10/90)

In article <1990Mar8.231513.24361@Octopus.COM> stever@octopus.UUCP (Steve Resnick ) writes:
>In article <5793@ncrcae.Columbia.NCR.COM> heath@ncrcae.Columbia.NCR.COM (Robert Heath) writes:
>>How do you comment out lines in config.sys without getting warning messages
>>from DOS as it attempts to read them ?
>
>There is no way to cleanly do this as far as I know, but you can place colons
>(:) infront of unwanted commands in config.sys if you don't mind the
>"Unrecognized command in CONFIG.SYS" messages....

I was about to respond with an answer like Steve's (i.e.- can't be done),
when I spotted an article on a "null driver" that gave me an idea.
(PC Magazine, V9#2, 1/30/90, p. 307, letter from Jefrrey J. Hamilton.)
This is a driver that installs and does nothing.  Jeff suggests naming
it for things you want temporarily out, without having to change the
config file.  But it can also be used to solve Robert's problem...

Name the null driver REM.  Since it ignores all arguments, you can put
in your CONFIG.SYS file lines like:

device=REM This line is a comment.

Haven't tried it, but it ought to work.  The program is small enough to
be entered from the debugger (that's how Jeff shows it).

+---------------------------------------------------------------+
|    Dave Tutelman						|
|    Physical - AT&T Bell Labs  -  Lincroft, NJ			|
|    Logical -  ...att!pegasus!dmt				|
|    Audible -  (201) 576 2194					|
+---------------------------------------------------------------+

CMH117@psuvm.psu.edu (Charles Hannum) (03/12/90)

In article <89@cvbnetPrime.COM>, jsulliva@cvbnet.UUCP (Jeff Sullivan, x4096 MS
4-2) says:
>
>  In MS-DOS 4.01, you are able to use "REM", just like
>  in batch files. This is a very useful feature, but I
>  am not sure if it's applicable to older versions of
>  DOS. Can anyone confirm this for earlier versions?

No.  It tries to execute the "REM" as a command and issues an error message.

shap@bunker.UUCP (Joseph D. Shapiro) (03/13/90)

In article <5793@ncrcae.Columbia.NCR.COM> heath@ncrcae.Columbia.NCR.COM (Robert Heath) writes:
>How do you comment out lines in config.sys without getting warning messages
>from DOS as it attempts to read them ?
>
>	Robert Heath

try prepending the line with SHELL=
dont forget to include a _real_ SHELL= line at the end of the file.
for example...

	SHELL=DEVICE=DONTWANT.SYS
	SHELL=this is a comment.
	DEVICE=ANSI.SYS
	SHELL=C:\DOS\COMMAND.COM C:\DOS /R
-- 
__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__--__
Joe Shapiro					"My other car is a turbo...
ISC-Bunker Ramo     				 ...too."
{decvax,yale,philabs,oliveb}!bunker!shap

freak@cbnewsc.ATT.COM (c.e.malloy..iii) (03/15/90)

With version 4.01 of MS-DOS, they have added the 'REM' to the
config.sys.

Clancy Malloy

fredex@cg-atla.agfa.com (Fred Smith) (03/17/90)

>In article <5793@ncrcae.Columbia.NCR.COM> heath@ncrcae.Columbia.NCR.COM (Robert Heath) writes:
>>How do you comment out lines in config.sys without getting warning messages
>>from DOS as it attempts to read them ?

As others have said there is not comment implemented for config.sys files
in version of DOS older than 4.01. However, just putting a REM at the
beginning of the line works just fine, if you can tolerate the 
resulting error message. DOS just skips the "invalid" command and
proceeds to the next one.

I have used this method for years to have commands in my config.sys that
I sometimes want to use, so that I don't hve to REMEMBER them when those
rare occasions arise.

Fred