Document 1408 COMSPEC MAPPING ON NOVELL NETWORK Description: LOGIN SCRIPT FOR SYSTEM WITH BOTH COMPAQ DOS 3.31 AND DR DOS 6.0 When setting up a Novell NetWare Network Server machine, it is normal for a Network Administrator to actually create a directory structure on the server's hard drive which contains all the various DOS operating system files for all the various DOS operating systems being used by network's DOS clients. This is often done to accommodate clients to the server who do not have their own hard drive. That is, such clients can use the server to access their DOS files and programs instead of their local floppy drive. For instance, a network server serving five clients using two different operating systems, say MS DOS 3.30 and COMPAQ DOS 3.31, will have two directories which contain all the operating system files contained in the clients' DOS directories. These directories might have paths on the server like SYS:PUBLIC/MSDOS/V3.30 and SYS:PUBLIC/COMPAQ/V3.31. When a client running MS DOS 3.30 attaches to the server and logs in to this environment, it is important that the client's DOS PATH and COMSPEC variables be adjusted to "point" (or MAP) to the server's copy of the client's DOS files. This is normally accomplished by the Network Administrator who makes some changes and adjustments to one of the server's files called the System Login Script. This Login Script is the NetWare Operating System's DOS operating system batch file equivalent. Using a few basic commands in this System Login Script, the Network Administrator can determine which DOS operating system the server client is currently using and then map that client in the right direction. If a user is using DR DOS as the client operating system on a Novell Network, it may not be immediately apparent as to how a DR DOS client can be properly identified and mapped from within the System Login Script. Normally, a line like MAP INS S2:=SYS:PUBLIC/%OS/%OS_VERSION in the System Login Script will handle the mapping properly. When DR DOS is the DOS client's operating system, however, the %OS and %OS_VERSION variables actually return MS DOS and v3.31 respectively. It is obvious how this can cause confusion. The DR DOS operating system is most compatible with MS DOS/COMPAQ DOS version 3.3X. It is for this reason that DR DOS appears to the NetWare operating system to be MS DOS 3.31. As a result, both COMPAQ DOS 3.31 and DR DOS versions 5.0 and 6.0 will end up being mapped to the same sub-directory on the NetWare server's hard drive. In order to prevent such conflicts, a little extra work is required when writing the System Login Script. Because the DR DOS client operating system actually maintains two environment variables called OS and VER which equal DRDOS and 5.0 or 6.0 respectively, it is actually possible to test the DOS client operating system in the System Login Script to determine if the DOS client is running COMPAQ DOS 3.31, DR DOS 5.0 or DR DOS 6.0. Once the DR DOS client is detected, the Login Script should map SYS:PUBLIC/%MACHINE/DRDOS/5.0 or SYS:PUBLIC/%MACHINE/DRDOS/6.0 This sample System Login Script explains and implements such a technique: REM These lines establish environment variables OS and VER REM if the DOS client is NOT running DR DOS (any version.) REM That is, any DOS client operating system other that REM DR DOS does not already maintain the environment REM variables OS and VER, and as a result, REM they need to be set. IF != "DRDOS" AND != "DRMDOS" THEN BEGIN DOS SET OS="%OS" DOS SET VER="%OS_VERSION" END REM All that's left to be done is to map the DOS client using REM the DOS environment variables and . MAP INS S2:=%FILE_SERVER/SYS:PUBLIC/%MACHINE/%/% COMSPEC=S2:COMMAND.COM The above script would result in the following: Compaq DOS 3.31's map would be: SYS:PUBLIC\PC_DOS\MSDOS\3.31\ DR DOS 6.0's map would be: SYS:PUBLIC\PC_DOS\DRDOS\6.0\ DR Multiuser DOS's map would be: SYS:PUBLIC\PC_DOS\DRMDOS\5.0\