Mat*_*ien 1 .net c# environment-variables
我目前正在开发一个应用程序,旨在成为Windows的改进环境变量编辑器.
我已经使用System.Environment.GetEnvironmentVariables()和Registry来获取它们.但是这两种方法都在%之间扩展了文本,所以不是像实例%systemroot%/ system32那样得到我的程序中的C:/ Windows/system32 /.
有没有办法阻止这些物品的扩张?
小智 5
当您从注册表获取环境变量时 - 您需要使用特殊标志:RegistryValueOptions.DoNotExpandEnvironmentNames.
RegistryValueOptions.DoNotExpandEnvironmentNames
归档时间:
14 年,8 月 前
查看次数:
200 次
最近记录: