[此贴子已经被作者于2006-7-18 11:10:17编辑过]
添加系统环境变量需要修改注册表using Microsoft.Win32;RegistryKey key = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\Session Manager\Environment");key.SetValue("YTName", "YTValue");