Set Windows Environment Variable

Fuzzyman fuzzyman at
Thu Mar 30 21:19:39 CEST 2006

Fredrik Lundh wrote:
> Fuzzyman wrote:
> > I *believe* that ``SetEnvironmentVariable`` exists in the underlying
> > windows API, but that it isn't wrapped by the win32api extension.
> SetEnvironmentVariable does the same thing as assignment to os.environ.
> The only way to set the environment for another process is to create the
> process yourself, and pass in an environment block.
> To modify the system environment, you need to update the registry and
> broadcast a window message; see:
> (that cannot be used to modify the environment for arbitrary processes,
> though.  it's up to each process to decide how to handle that message,
> if it cares about window messages at all).

I think I can use the information posted in this thread to achieve what
I want. Thanks for your help.


> </F>

More information about the Python-list mailing list