Path: utzoo!attcan!uunet!peregrine!elroy.jpl.nasa.gov!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!psuvax1!rutgers!maverick.ksu.ksu.edu!uafhp!engr.uark.edu!sab From: sab@engr.uark.edu (Steven A. Breuer) Newsgroups: comp.os.msdos.programmer Subject: Re: Command.com and a message Summary: getenv() & putenv() Message-ID: <5648@uafhp.uark.edu> Date: 5 Dec 90 18:48:10 GMT References: <67560@unix.cis.pitt.edu> Sender: netnews@uafhp.uark.edu Lines: 17 In article <67560@unix.cis.pitt.edu>, kwgst@unix.cis.pitt.edu (Karol W Gieszczykiewicz) writes: > > I know it's possible because WordPerfect does it. Every time > one presses , after exiting to shell, a short message > appears, telling the user to type "exit" to return to > WP. I want to know how to chain in such a message. I don't > mind creating a modified copy of command.com and then running > it. > Look at the getenv() and putenv() functions. Most MS-DOS C compilers should have these functions. Use getenv() to get the prompt string. Then use putenv() to set the prompt to whatever you like. Now execute COMMAND.COM with the desired parameters. This only changes the prompt environment variable for your program - not its parent program. Steve Breuer sab@engr.uark.edu