Exemple #1
0
        /// <summary>
        /// Sets the value of an existing variable or
        /// create a new variable if it does not exist.
        /// </summary>
        ///
        /// <param name="variable">
        /// The name of the variables to retrieve.
        /// </param>
        ///
        /// <param name="value">
        /// The new value of the variable
        /// </param>
        ///
        /// <param name="scope">
        ///  The scope tp create the variable.
        /// </param>
        ///
        protected void SetVariable(string variable, string value, EnvironmentVariableTarget scope)
        {
            EnvironmentVariable envvar = new EnvironmentVariable(variable, value, scope);

            envvar.Activate();
        }