Tuesday, May 27, 2008

Running UNIX Applications on DOS/Windows Machines

Replacing Command.Com with the Shell


If you want to emulate a UNIX System environment as fully as possible, replace COMMAND .COM with the shell as your default command interpreter. With this approach you do not use COMMAND.COM at all. This has the advantage of being most like a UNIX System environment. It even allows you to set up multiple user logins. It does not allow simultaneous use by more than one user, but it does permit each user to run under a customized environment-for example, with a different prompt or PATH. The disadvantage of this method is that you can no longer easily exit to COMMAND.COM, because it is not set up as your underlying shell. If you want to run a DOS program that demands the slash as a marker for command switches instead of the backslash, you may have to write a shell script to switch back and forth for this application. As another example, you may lose access to certain DOS commands that are built into COMMAND.COM rather than provided as separate programs.

Some frequently used DOS commands, such as DIR and TYPE, are internal, which means that instead of being separate executable commands, they are part of COMMAND.COM. If you are using the shell, it cannot call them directly In order to use these commands, you must set up an alias for them using the alias command.

If you use the shell as your command interpreter, put a command in your CONFIG.SYS file to tell the system to bypass COMMAND.COM and go directly to the shell or to an initialization program that allows multiple user logins. If you choose the initialization program, the system will set up multiple user logins, each one with its own environment. The documentation for the specific toolkit products such as MKS Toolkit will help you choose and set up the various possible configurations.

No comments: