c# - Where Does Environment.GetEnvironmentVariables() Get Its Information? -


i have tt powershell script running part of c# project. script references environment.getenvironmentvariables() contents of path variable.

but data returned includes paths need change, , not match path in windows itself.

where method paths , how change them?

it uses windows api getenvironmentstrings() data. (the unicode version.)

also see documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682653%28v=vs.85%29.aspx

to set environment variable, can use this overload of environment.setenvironmentvariable() lets specify process, user or machine set.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -