Article View: comp.windows.misc
Article #456Re: Recursive Windows
From: Dale Frye
Date: Thu, 24 Jan 1991 06:20
Date: Thu, 24 Jan 1991 06:20
39 lines
1642 bytes
1642 bytes
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
Technical Details
Message-ID:
<1991Jan24.062054.27946@cec1.wustl.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!cec2!newsReferences:
<11299905@91014.153634YTHPRGDB@mtus5.bitne> <1097300003@cdp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!cec2!news From: dale@wucs1.wustl.edu (Dale Frye) Newsgroups: comp.windows.misc Subject: Re: Recursive Windows Message-ID: <1991Jan24.062054.27946@cec1.wustl.edu> Date: 24 Jan 91 06:20:54 GMT References: <11299905@91014.153634YTHPRGDB@mtus5.bitne> <1097300003@cdp> Organization: Washington University, St. Louis MO Lines: 39