using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Management; namespace EnvironmentVariableAddDel { class Program { static void Main(string[] args) { string envPath = "Win32_Environment.Name='LM_LICENSE_FILE'" + ",UserName='<SYSTEM>'"; ManagementObject envObject = new ManagementObject(envPath); envObject["27010@license.esiee.fr"] = "27000@license.esiee.fr"; envObject.Put(); // Save the change to the system } } }
try-catch
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)