Xref: utzoo comp.sources.wanted:2704 comp.sys.ibm.pc:9541
Path: utzoo!mnetor!uunet!husc6!hao!boulder!sunybcs!ugfailau
From: ugfailau@sunybcs.uucp (Fai Lau)
Newsgroups: comp.sources.wanted,comp.sys.ibm.pc
Subject: Re: Need LOGIN Shell for MS-DOS
Message-ID: <7216@sunybcs.UUCP>
Date: 14 Dec 87 01:57:55 GMT
References: <145@tsdiag.UUCP> <17389@bu-cs.BU.EDU>
Sender: nobody@sunybcs.UUCP
Reply-To: ugfailau@joey.UUCP (Fai Lau)
Organization: SUNY/Buffalo Computer Science
Lines: 41
Keywords: MSDOS

In article <17389@bu-cs.BU.EDU> madd@bu-it.bu.edu (Jim Frost) writes:

>It's simple enough to make your login program start up with the shell=
>command in config.sys.  The login program must exec command.com, which
>is also simple enough.  The hard part is that there's no way to
>specify an autoexec.bat file specifically, and even if there was, you
>don't want the shell to be permanent (so that you can just drop back
>to your login program when they exit) which is currently the only way
>MS-DOS allows you to run a batch file and then go interactive.
>
	Why don't you do this? Issue a "rename" at the end of
the *default* autoexec.bat to change its name, and issue
another "rename" to change the name of another bat file to 
autoexec.bat, which is to be brought in for another command
shell. If you want to bring the default batch file back, you
can still issue another pair of rename at the end of the
other batch file. By manipulating the name of the autoexec.bat
within autoexec.bat, you can control which batch file is to
be used when the next command shell is invoked. You can even
copy the autoexecs in the user directories to the
default autoexec.bat and then load up the shell, and
stick another copy at the end of the file to undo the
copy. Of course, this doesn't solve the problem of
having two shells in the system. If there is a way
to "substitute the current shell with a new shell....,
but then the login program in the first shell may
have to be lost. I only have experience in UNIX multitasking
in PC, so I can't say much about MS-DOS multi-
user environment.

>The only way I could get it to do this was to put a "command" command
>at the end of the autoexec.bat file.  This invokes yet another command
>interpreter and puts it in interactive mode.  The new command
>interpreter inherits the parent's environment, so everything's peachy.
>
	No problem.

Fai  Lau
SUNY at Buffalo (The Arctic Wonderland)
UU: ..{rutgers|ames}!sunybcs!ugfailau
BI: ugfailau@sunybcs INT: ugfailau@cs.buffalo.EDU