Setting Windows Environment Variables programmatically (win32/mfc) [modified]
-
Hi, I came across an article about setting windows Environment variables from within a program. http://www.codeproject.com/KB/system/EnvMan.aspx[^] However it uses .net library's Environment class to do it. Is there some way to do it using win32/mfc native code?:confused: I tried the _putenv() and getenv() functions but it seems they affect the process which makes these calls only. The changed values do not get reflected on the system level. :doh: Is there any other way to achieve this?
only dead fish swim with the stream
modified on Sunday, May 25, 2008 8:38 AM
-
Hi, I came across an article about setting windows Environment variables from within a program. http://www.codeproject.com/KB/system/EnvMan.aspx[^] However it uses .net library's Environment class to do it. Is there some way to do it using win32/mfc native code?:confused: I tried the _putenv() and getenv() functions but it seems they affect the process which makes these calls only. The changed values do not get reflected on the system level. :doh: Is there any other way to achieve this?
only dead fish swim with the stream
modified on Sunday, May 25, 2008 8:38 AM
Check this one - http://www.codeguru.com/cpp/w-p/win32/tutorials/article.php/c10849/[^] Regards, Jijo.
_____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.
-
Check this one - http://www.codeguru.com/cpp/w-p/win32/tutorials/article.php/c10849/[^] Regards, Jijo.
_____________________________________________________ http://weseetips.com[^] Visual C++ tips and tricks. Updated daily.