win32api.SetEnvironmentVariableW

SetEnvironmentVariableW(Name, Value)

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

Parameters

Name : str

Name of the environment variable

Value : str

Value to be set, or None to remove variable

Win32 API References

Search for SetEnvironmentVariable at msdn, google or google groups.