win32api.SetEnvironmentVariable

SetEnvironmentVariable(Name, Value)

Creates, deletes, or changes the value of an environment variable.

Parameters

Name : str/unicode

Name of the environment variable

Value : str/unicode

Value to be set, use None to remove variable

Win32 API References

Search for SetEnvironmentVariable at msdn, google or google groups.