如何用代码添加环境变量?
如何用代码添加环境变量?[此贴子已经被作者于2006-7-18 11:10:17编辑过]
[此贴子已经被作者于2006-7-18 11:10:17编辑过]
2006-07-18 10:08

2006-07-18 10:47
2006-07-18 11:08

2006-07-18 11:25
2006-07-18 13:52
2006-07-18 14:39
添加系统环境变量需要修改注册表
using Microsoft.Win32;
RegistryKey key = Registry.LocalMachine.CreateSubKey(@"System\CurrentControlSet\Control\Session Manager\Environment");
key.SetValue("YTName", "YTValue");

2006-07-18 14:44