using Microsoft.Win32;Reading:
...
const string REGISTRY_KEY = "software\\yourcompany\\yourapp";
...
RegistryKey key = Registry.CurrentUser.CreateSubKey(REGISTRY_KEY);
key.SetValue("user", args[1]);
key.Close();
using Microsoft.Win32;
...
const string REGISTRY_KEY = "software\\yourcompany\\yourapp";
...
string user = null;
RegistryKey key = Registry.CurrentUser.OpenSubKey(REGISTRY_KEY);
if (key != null)
{
user = (string)key.GetValue("user");
key.Close();
}
No comments:
Post a Comment