Hi,
I'm trying to write a program that will change a certain environment variable. I've tried using _putenv(). I realize that this just writes it for the current process but doesn't actually set it at the system level. I can tell becuase I will call putenv() and then use getenv() in the same program and it is fine, but it is gone after it exits.
Is there a way to get it to be set and stay? Basically, just as if I had just typed...
setenv VARNAME VALUE
...at a UNIX prompt.
Thanks.
-Tyler -Tyler
I'm trying to write a program that will change a certain environment variable. I've tried using _putenv(). I realize that this just writes it for the current process but doesn't actually set it at the system level. I can tell becuase I will call putenv() and then use getenv() in the same program and it is fine, but it is gone after it exits.
Is there a way to get it to be set and stay? Basically, just as if I had just typed...
setenv VARNAME VALUE
...at a UNIX prompt.
Thanks.
-Tyler -Tyler