environment variables

hi,

To change the environment variables in system we need to go to properties ,in properties we need to go to advanced and in that we are changing environment variables.But I want to change the envoironment variables in my system through vc++ program.so can you please tell me the way to do that.
[313 byte] By [satish@123] at [2007-11-19 19:43:17]
# 1 Re: environment variables
http://support.microsoft.com/?kbid=104011

You can change environment variables programmatically using Registry API.
Alex F at 2007-11-10 23:43:06 >
# 2 Re: environment variables
You can use SetEnvironmentVariable(LPSTR lpName,LPSTR lpValue) function.
venkatapathiraju_t at 2007-11-10 23:44:00 >