Share via


EnvironmentManager.SetEnvironmentVariable(String, String) Method

Definition

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.

Applies to

See also