Main Page | Report this Page
Computers Forum Index  »  Computer Compilers - LCC  »  Setting an environment variable...
Page 1 of 1    

Setting an environment variable...

Author Message
Caesar Romano...
Posted: Tue May 19, 2009 9:50 pm
Guest
Hello,
Using lccwin32 on winxp, the SetEnvironmentVariable function sets the
value of an environment variable for the current process. Is there any
function that will set an environment variable that will persist after
the current process ends?

Thanks
 
glen herrmannsfeldt...
Posted: Tue May 19, 2009 9:50 pm
Guest
Caesar Romano <Spam at (no spam) uce.gov> wrote:

Quote:
Using lccwin32 on winxp, the SetEnvironmentVariable function sets the
value of an environment variable for the current process. Is there any
function that will set an environment variable that will persist after
the current process ends?

Note that this isn't a compiler (or library) question but
a system question. Does the system in question (XP) provide
any way for a program to do that?

In the few cases it is needed for unix (see tset for example) it
is done by returning the commands needed in the specified shell,
such that the user can get them executed.

In XP, the system control panel can set the value for
environment variables in new shells. That could probably also
be done through the registry editor. But that applies to new
shells, not currently running parent shells.

-- glen
 
...
Posted: Wed May 20, 2009 5:16 am
Guest
On Tue, 19 May 2009 21:09:55 +0000 (UTC), glen herrmannsfeldt
<gah at (no spam) ugcs.caltech.edu> wrote:

<snip>
Quote:

I don't believe so, but then I haven't looked so hard.
I don't think so, either.


Quote:
In DOS there was only one environment.
Not really. There is 1 master environment, and any program that is

run, gets a COPY of that environment. Any changes made to the copy get
lost when the program ends. It is possible to make changes to the
master environment with third party software.


Quote:
I knew of people doing
multitasking with DOS, where changes in one would directly change
the environment of others.
snip

--
ArarghMail905 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html

To reply by email, remove the extra stuff from the reply address.
 
 
Page 1 of 1    
All times are GMT
The time now is Sat Nov 28, 2009 9:19 am