🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #11709

Re: Changing the path (and other environment variables)read 7637

#11709
From: Sanjay Aiyagari
Date: Thu, 09 May 1991 19:47
31 lines
2460 bytes
In article <1991May9.091904.86688@vaxc.cc.monash.edu.au>,
hadgraft@vaxc.cc.monash.edu.au (Hadgraft) writes: 
> In article <1991May3.194552.24233@maytag.waterloo.edu>, 
> dmurdoch@watstat.waterloo.edu (Duncan Murdoch) writes:
>>
>> I'm new at Windows, so this is probably an easy question.  (Is there a FAQ
>> list somewhere?)   How do I change the master copy of the Path from within
>> Windows?  What I want is the equivalent of the PATH command in COMMAND.COM;
>> just opening a DOS window and using it doesn't work, because the change is
>> local to that window.
>>
> As far as I know, it's not possible. It pays to get it right first time.
> 
> Since each application gets it's own copy of the DOS environment, it's 
> possible to change the PATH for each one, which might solve your problem. I 
> do this when building Windows applications. I run a batch file that sets the 
> appropriate PATH, then runs MAKE. This saves having all the development 
> directories cluttering my normal PATH.

True, this is the only way to do it, but Windows SHOULD be able to let you
change the default environment passed to DOS processes.  The DOS EXEC call
allows a pointer to an enviroment block; if this is 0 then it just uses the
parent environment (in this case, the PATH statement set before Windows was
run).  It looks like Microsoft just let this parameter be 0 when issuing DOS
EXEC calls; if Windows had a program called, say, "Environment", that let you
edit and save a default environment configuration, this could easily be passed
to all executing programs (DOS as well as Windows programs), allowing you to
change the default PATH without exiting to DOS.  It would also eliminate the
need to have a huge PATH statement before loading Windows, as is now necessary.

Sanjay Aiyagari (hd7x@vax5.cit.cornell.edu)
Technical Details
Message-ID: <1991May9.154718.4636@vax5.cit.cornell.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!rpi!batcomputer!cornell!vax5.cit.cornell.edu!hd7x
References: <1991May3.194552.24233@maytag.waterloo.edu> <1991May9.091904.86688@vaxc.cc.monash.edu.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!rpi!batcomputer!cornell!vax5.cit.cornell.edu!hd7x
From: hd7x@vax5.cit.cornell.edu (Sanjay Aiyagari)
Newsgroups: comp.windows.ms
Subject: Re: Changing the path (and other environment variables)read 7637
Summary: Change PATH without going to DOS
Keywords: DOS EXEC PATH
Message-ID: <1991May9.154718.4636@vax5.cit.cornell.edu>
Date: 9 May 91 19:47:18 GMT
References: <1991May3.194552.24233@maytag.waterloo.edu> <1991May9.091904.86688@vaxc.cc.monash.edu.au>
Distribution: comp
Organization: CIT, Cornell University
Lines: 31