 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Douglas Stites Guest
|
Posted: Tue Apr 24, 2007 8:25 pm Post subject: Get and Set Environment varialbes |
|
|
BSD2006, C++ personality
I want to get and set windows environment variables
getenv and putenv don't work (they work for cmd.exe, but not for windows
unless I am doing something wrong.
thanks in advance |
|
| Back to top |
|
 |
Alan Bellingham Guest
|
Posted: Tue Apr 24, 2007 8:48 pm Post subject: Re: Get and Set Environment varialbes |
|
|
"Douglas Stites" <doug (AT) stites (DOT) org> wrote:
| Quote: | BSD2006, C++ personality
I want to get and set windows environment variables
getenv and putenv don't work (they work for cmd.exe, but not for windows
unless I am doing something wrong.
thanks in advance
|
You know that those settings last only to the end of the current
process? So, if you expect one program to effectively inject environment
variables into Windows as a whole, you're out of luck.
(Changing PATH would have been an especially bad idea for security
reasons.)
If you want to do this, then make sure that your program does the
setenv() stuff, runs whatever else you want to run, and then terminates
after that has finished.
Alan Bellingham
--
ACCU Conference 2008: 2-5 April 2008 - Oxford (probably), UK |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|