|
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Win32;
namespace NVM
{
public class UserEnvData : BaseEnvData
{
public UserEnvData() : base()
{
}
public override void Initialize()
{
base.Initialize();
// Get the User Environment Variables
RegistryKey theKey = Registry.CurrentUser;
theKey = theKey.OpenSubKey(@"Environment", true);
// GetValueNames will return the names of all the keys within the Enviroment Key
foreach (string key in theKey.GetValueNames())
{
string keyValue = (theKey.GetValue(key)).ToString();
EnvData data = new EnvData(key, keyValue);
_envData.Add(data);
}
theKey.Close();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
An individual with more than a decade of experience in desktop computing and mobile app development primarily on the Microsoft platform. He loves programming in C#, WPF & XAML related technologies.
Current interests include web application development, developing rich user experiences across various platforms and exploring his creative side.
Ratish's personal blog:
wpfspark.wordpress.com