UtilEnvironmentVariableRegisterVariable(EnvironmentVariableTarget, String, String, Boolean) Method

Registers a Windows environment variable.

Definition

Namespace: DevCase.Core.Windows.Common
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void RegisterVariable(
	EnvironmentVariableTarget scope,
	string name,
	string value,
	bool throwOnExistingVariable = false
)

Parameters

scope  EnvironmentVariableTarget
The environment scope that will owns the variable.
name  String
The variable name.
value  String
The variable value.
throwOnExistingVariable  Boolean  (Optional)
If , raises an exception if the variable already exists.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentNullException name
InvalidEnumArgumentException scope
ArgumentException The specified variable already exists.;name

See Also