EnvironmentManager.SetEnvironmentVariable(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the value of the specified environment variable at the scope of the current EnvironmentManager.
public:
virtual void SetEnvironmentVariable(Platform::String ^ name, Platform::String ^ value) = SetEnvironmentVariable;
void SetEnvironmentVariable(winrt::hstring const& name, winrt::hstring const& value);
public void SetEnvironmentVariable(string name, string value);
function setEnvironmentVariable(name, value)
Public Sub SetEnvironmentVariable (name As String, value As String)
Parameters
- name
-
String
Platform::String
winrt::hstring
The name of the environment variable to set.
- value
-
String
Platform::String
winrt::hstring
The new value to set for the specified environment variable.
Remarks
To remove an environment variable, call this method with an empty string as the value.