[comp.windows.misc] Recursive Windows

jeff@cdp.UUCP (01/16/91)

Create a batch file called WIN.BAT.  Assuming that Windows is
installed in C:\WINDOWS, the batch file should say:

if "%windir%" == "" c:\windows\win %1 %2

Make sure that this batch file is NOT in the C:\WINDOWS
directory; it should be in another directory, one which
appears in the PATH before C:\WINDOWS.  If you can't
control PATHs, you'll need to do something clever,
like rename win.com.

	Jeff Dean
	uunet!pyramid!cdp!jeff
	jeff@cdp.igc.org

dale@wucs1.wustl.edu (Dale Frye) (01/24/91)

In article <1097300003@cdp> jeff@cdp.UUCP writes:
>
>Create a batch file called WIN.BAT.  Assuming that Windows is
>installed in C:\WINDOWS, the batch file should say:
>
>if "%windir%" == "" c:\windows\win %1 %2
>
>Make sure that this batch file is NOT in the C:\WINDOWS
>directory; it should be in another directory, one which
>appears in the PATH before C:\WINDOWS.  If you can't
>control PATHs, you'll need to do something clever,
>like rename win.com.

This won't work!  windir is stored in the enviroment in lower case.
The above command will first convert windir to upper case before looking
in the environment. I know because I tried to do what you suggested.

My fix --

Rearranage the path command so that the path to your batch files are before
the path to the win program. Create a win.bat file like this.

@echo off
if "win"=="yes" exit
set win=yes
c:\windows\win
set win=no
c:
cd \


Now change the the program name for the DOS window to "C:\command.com".

Note: Set disk and directory names as needed. I used C:\ as an example.
      The only thing important is to keep out of the directory that
      contains the real win.com program.

Dale Frye
Washington University in St. Louis