From: Niklas Larsson Sent: 2012-10-23 10:16 To: herak...@gmx.de Subject: RE: [racket] putenv The environment is something that belongs to a process (and its children). The way to change the system wide defaults on windows (from a program) is to change the registry keys that hold them. Remember that those only affect new processes.
Niklas From: herak...@gmx.de Sent: 2012-10-23 09:48 To: racket Subject: Re: [racket] putenv Hmm, is there a Racket specific command to change env variables system wide?? The (system "...") command also change it only locally.... Yours, -------- Original-Nachricht -------- > Datum: Mon, 22 Oct 2012 08:02:36 -0600 > Von: Jay McCarthy <jay.mccar...@gmail.com> > An: herak...@gmx.de > CC: racket <users@racket-lang.org> > Betreff: Re: [racket] putenv > How are you checking "in the system"? > > putenv does not make a global change to your system settings, instead > it changes the environment locally. For example, on Unix (it would > work the same on Windows, but I don't know a lot about the Windows > shell), > > [outer] $ FOO=1 > [outer] $ echo $FOO > 1 > [outer] $ racket > [racket] > (putenv "FOO" "2") > #t > [racket] > (getenv "FOO") > "2" > [racket] > (system "/bin/sh") > [inner] $ echo $FOO > 2 > [inner] $ exit > > (exit 0) > [outer] $ echo $FOO > 1 > > The only real use of putenv is with system, when you want the Racket > program to run another program. > > Jay > > On Mon, Oct 22, 2012 at 7:38 AM, <herak...@gmx.de> wrote: > > Hello friends, > > > > I try to change my env variables in windows 7. getenv works fine, but > when I change a specific env variable it returns #t but in the system there > are no changes... > > > > > > Yours, > > ____________________ > > Racket Users list: > > http://lists.racket-lang.org/users > > > > -- > Jay McCarthy <j...@cs.byu.edu> > Assistant Professor / Brigham Young University > http://faculty.cs.byu.edu/~jay > > "The glory of God is Intelligence" - D&C 93 ____________________ Racket Users list: http://lists.racket-lang.org/users ____________________ Racket Users list: http://lists.racket-lang.org/users